Skip to content
Takeshi Nakatani edited this page Feb 12, 2023 · 40 revisions

General Instructions

From released tarball or zip

Download: Latest version

tar xvzf s3fs-fuse-1.87.tar.gz
cd s3fs-fuse-1.87/
./autogen.sh
./configure --prefix=/usr # See (*1)
make
make install (as root)

From GitHub repository

git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse/
autoreconf --install (or ./autogen.sh)
./configure --prefix=/usr # See (*1)
make
make install (as root)

Notes for Specific Operating Systems

Debian / Ubuntu

Tested on Ubuntu 14.04 LTS

Install prerequisites, clone source, configure, make and install:

sudo apt-get install build-essential git libfuse-dev libcurl4-openssl-dev libxml2-dev mime-support automake libtool
sudo apt-get install pkg-config libssl-dev # See (*3)
git clone https://github.com/s3fs-fuse/s3fs-fuse
cd s3fs-fuse/
./autogen.sh
./configure --prefix=/usr --with-openssl # See (*1)
make
sudo make install

Build .deb for Ubuntu 18.04/20.04 from within Docker

Here is a Dockerfile which will build a .deb package for s3fs based on a given commit. The resulting files are also available for download.

Fedora / CentOS / RHEL

Tested on Fedora 28 and CentOS 7.

Note: This procedure does NOT work for RHEL6/CentOS 6, as s3fs does not support such distributions since v1.87

yum install gcc libstdc++-devel gcc-c++ fuse fuse-devel curl-devel libxml2-devel mailcap git automake make
yum install openssl-devel # See (*2)
git clone https://github.com/s3fs-fuse/s3fs-fuse
cd s3fs-fuse/
./autogen.sh
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --prefix=/usr --with-openssl # See (*1)
make
sudo make install

RHEL6/CentOS 6 (s3fs version >= 1.74)

WARNING: s3fs 1.87 removed the support for RHEL6/CentOS6. If you want to use s3fs on RHEL/CentOS6 the last version you can compile is 1.86

s3fs versions from 1.74 require at least fuse equal or newer than 2.8.4, which is not available at RHEL6/CentOS 6 as they provide 2.8.3 (and neither RHEL5/CentOS 5 as they provide 2.7.4). See issues #42 and #279 for details.

That means you need to build and install a newer version of fuse.

The following commands will install fuse 2.8.4, but please make sure this is not a problem for your system, and keep in mind you are doing this on your own.

Run as root:

yum install -y gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel mailcap git automake make wget # fuse and s3fs prerequisites
yum install openssl-devel # See (*2)
wget https://github.com/libfuse/libfuse/releases/download/fuse_2_9_4/fuse-2.8.4.tar.gz
tar zxvf fuse-2.8.4.tar.gz
cd fuse-2.8.4/ && ./configure && make && make install
echo -e '\\n/usr/local/lib' >> /etc/ld.so.conf
ldconfig

Note: If s3fs command execution results in following message with “s3fs: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory”, you need to yum install fuse-libs

Now you can compile in the same way you would do for RHEL7/CentOS 7, but adding an extra line (export) to point configure to the fuse package we compiled above:

git clone https://github.com/s3fs-fuse/s3fs-fuse
cd s3fs-fuse/
./autogen.sh
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --prefix=/usr --with-openssl # See (*1)
make
sudo make install

As an alternative you can build and install RPMs for both fuse and latest stable version for s3fs by using the GitHub repository that is source for the Fedora and EPEL (CentOS/RHEL) s3fs-fuse packages.

Amazon Linux

sudo sed -i 's/enabled=0/enabled=1/' /etc/yum.repos.d/epel.repo
sudo yum install -y gcc libstdc++-devel gcc-c++ fuse fuse-devel curl-devel libxml2-devel mailcap automake openssl-devel git
git clone https://github.com/s3fs-fuse/s3fs-fuse
cd s3fs-fuse/
./autogen.sh
./configure --prefix=/usr --with-openssl
make
sudo make install

SUSE and openSUSE

Installing experimental packages

If the official package is old and you want a more recent version (not officially supported!), then check experimental versions at https://software.opensuse.org/package/s3fs, and then choose one of three alternatives:

  1. Use the 1 Click Install button (easiest option, but only works when using GUI).

  2. Download the RPM package from website above (Download button) and install it with sudo rpm -i

  3. Install the filesystem repository for any of the supported OS at https://download.opensuse.org/repositories/filesystems/: Browse inside the folder for your OS, right click on the filesystems.repo file, and use it with zypper ar. For example for openSUSE 42.3:

    zypper ar https://download.opensuse.org/repositories/filesystems/openSUSE_Leap_42.3/filesystems.repo

    Then install the package normally:

    sudo zypper in s3fs

Compiling sources

Tested on openSUSE Leap 42.3 and Leap 15.0. Should work as well on any SUSE >= 12 or any openSUSE >= 42.1

Install prerequisites, clone source, configure, make and install:

sudo zypper in -y automake curl-devel fuse fuse-devel gcc-c++ libxml2-devel make openssl-devel
git clone https://github.com/s3fs-fuse/s3fs-fuse
cd s3fs-fuse/
./autogen.sh
./configure --prefix=/usr/local --with-openssl # See (*1)
make
sudo make install

This will install the executable at /usr/local/bin/s3fs, and the man page at /usr/local/share/man/man1/s3fs.1

Mac OSX

Assuming you have installed Homebrew, you'll need to install these dependency packages:

  • macfuse
  • automake
  • gcc
  • curl
  • libxml2
  • pkg-config
  • openssl

And as noted in the output of the openssl install, you'll need to set these environment variables:

  export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
  export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"

Depending on where Homebrew was installed, the /usr/local path above should be replaced with /opt/homebrew. Please check your Homebrew environment and replace the above.

Then you should be able to follow the standard compilation instructions.

Users on Apple Silicon M1 Macs have reported the need to ensure that the terminal is not opened using Rosetta. If you're unsure, it's probably safe to try compiling anyway. If compilation fails with an error like "ld: symbol(s) not found for architecture x86_64" then you may need to investigate disabling Rosetta.

Explanatory note

Common for building(*1, *2)

Latest master branch supports three libraries about SSL, those are OpenSSL, NSS and GnuTLS(gcrypt and nettle). You should use the library as same as that is linked in libcurl. The libcurl supports OpenSSL, NSS, GnuTLS etc, you should confirm which library is linked by libcurl. (ex. "curl --version" command shows libcurl types and version.)

(*1) You can specify following configure option:

  • Use OpenSSL --with-openssl(default)
  • Use NSS --with-nss
  • Use GnuTLS --with-gnutls(or --with-gnutls --with-nettle)

(*2) Depending on a library to use, please install the developer package.

(*3) Some OS(ubuntu 14.10 etc) needs these packages.

From conda-forge

The conda-forge project provides an open-source package management ecosystem, written mostly in Python.

The most efficient method to get s3fs is to install Mambaforge. Then run

mamba install -c conda-forge s3fs-fuse

Alternatively, install Anaconda, Miniconda, or Miniforge, and run

conda install -c conda-forge s3fs-fuse

Any issues should be reported to the conda-forge s3fs-fuse feedstock.