libcurl.so.4: 无法打开共享对象文件:没有那个文件或目录

libcurl.so.4: cannot open shared object file: No such file or directory

我正在创建 s3fs-fuse on Ubuntu 14.04 by following the compilation link 的二进制文件。在某些系统中,我在 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

我看到二进制文件正在使用 libcurl-gnutls.so.4,但我觉得我们需要 openssl。

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)

所以从我构建二进制文件的系统,我看到下面

    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)

所以二进制选择 libcurl3-gnutls:amd64 而不是 libcurl4-openssl-dev:amd64 。我怎样才能改变这种行为。

请安装 libcurl3 包。

将来,如果您丢失了某些文件,您可以使用 https://packages.ubuntu.com 查找提供您需要的文件的软件包。

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