12

I am creating binary of s3fs-fuse on Ubuntu 14.04 by following the compilation link. In some systems I get the below error while doing the mount operation on kubernetes pods

      ----     ------                 ----             ----                   -------
  Normal   Scheduled              5h               default-scheduler      Successfully assigned verifypod5 to 10.171.42.29
  Normal   SuccessfulMountVolume  5h               kubelet, 10.171.42.29  MountVolume.SetUp succeeded for volume "default-token-scrsz"
  Warning  FailedMount            5h (x8 over 5h)  kubelet, 10.171.42.29  MountVolume.SetUp failed for volume "pvc-f2d4cacc-6a51-11e8-b133-fa53da29538e" : mount command failed, status: Failure, reason: Error mounting volume: s3fs mount failed: s3fs: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

I see that the binary is using libcurl-gnutls.so.4 but I feel we need the openssl one.

ldd /usr/local/bin/s3fs
linux-vdso.so.1 =>  (0x00007ffc3d1cb000)
libfuse.so.2 => /lib/x86_64-linux-gnu/libfuse.so.2 (0x00007fb0fd742000)
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007fb0fd4d5000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fb0fd11a000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fb0fccd6000)

So from the system where I did the building of binary, I see below

    dpkg -l | grep curl
ii  curl                                7.47.0-1ubuntu2.8                          amd64        command line tool for transferring data with URL syntax
ii  libcurl3:amd64                      7.47.0-1ubuntu2.8                          amd64        easy-to-use client-side URL transfer library (OpenSSL flavour)
ii  libcurl3-gnutls:amd64               7.47.0-1ubuntu2.8                          amd64        easy-to-use client-side URL transfer library (GnuTLS flavour)
ii  libcurl4-openssl-dev:amd64          7.47.0-1ubuntu2.8                          amd64        development files and documentation for libcurl (OpenSSL flavour)

So the binary picks up libcurl3-gnutls:amd64 instead of libcurl4-openssl-dev:amd64 . How can I change this behaviour.

ambikanair
  • 4,004
  • 11
  • 43
  • 83

2 Answers2

25

Please install libcurl3 package.

For the future, if you're missing some file, you can use https://packages.ubuntu.com to find what package provides a file you need.

For example: https://packages.ubuntu.com/search?searchon=contents&keywords=libcurl.so.4&mode=filename&suite=xenial&arch=any

matiit
  • 7,969
  • 5
  • 41
  • 65
  • 2
    Ok. As per doc I am executing this step sudo apt-get install automake autotools-dev fuse g++ git libcurl4-openssl-dev libfuse-dev libssl-dev libxml2-dev make pkg-config – ambikanair Jun 07 '18 at 13:11
  • The above one solves the issue but the problem is, in actual scenario, I dont have access to those worker nodes to install `libcurl13`. This is something to do with the way or the os from which I build the fuse binary. @matiit – ambikanair Jun 07 '18 at 13:19
  • 1
    Because you're compiling it for specific system, some libraries it's linked against might not be available on other systems. That is common problem in Linux distributions. Best solution in my opinion is to provide separate packages for different systems. – matiit Jun 07 '18 at 15:25
  • Link's down, unfortunately. – LinusGeffarth Sep 15 '20 at 19:44
0

some times you may need to install [ curl libcurl4:i386 ] together .