Ubuntu 20.04-未找到 libhdf5_serial.so.10(Gdal 安装)

Ubuntu 20.04-未找到 libhdf5_serial.so.10(Gdal 安装)

我将 ubuntu 从 16.04 更新到 20.04,Gdal(地理空间数据库)停止工作。每当我尝试使用它(使用gdalinfo、C++ 或 python 库或 Qgis)时,都会出现以下错误:

error while loading shared libraries: libhdf5_serial.so.10: cannot open shared object file: No such file or directory

全局升级/更新后,我尝试卸载所有与 gdal 相关的东西,然后按照此操作邮政但我遇到了同样的错误。

存储库“http://ppa.launchpad.net/ubuntugis/ppa/ubuntu”似乎尚未发布 20.04,但之前的帖子说没有必要,所以我没有进行调查。

我试过这个github 帖子也(而libhdf5_serial.so.10不是libhdf5_serial.so.100):

sudo ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103 /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10

但是现在,我遇到了一个新的错误,我真的不知道现在该怎么办:

symbol lookup error: /usr/lib/libgdal.so.26: undefined symbol: wrapper2_dgbcon_

仅供参考,我尝试保留 18.04,但是在更新时很多东西都坏了(这就是我长期停留在 16.04 的原因),而 20.04 似乎解决了几乎所有问题(嗯......除了 Gdal......),所以如果可能的话我宁愿不要回到 18.04......

如果有人对我可以尝试什么有什么建议,那就太好了,我现在有点绝望!

编辑:

其他信息:

  • which gdalinfo->“/usr/bin/gdalinfo”
  • dpkg -S $(which gdalinfo)-> “gdal-bin:/usr/bin/gdalinfo”
  • gdalinfo --version-> 我遇到了和调用相同的错误gdalinfo
  • gdal-config --version–> 3.0.4

ldd /usr/bin/gdalinfo给出

linux-vdso.so.1 (0x00007ffe33fe1000)
libgdal.so.26 => /usr/lib/libgdal.so.26 (0x00007f1cfac69000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1cfaa77000)
libarmadillo.so.9 => /usr/lib/x86_64-linux-gnu/libarmadillo.so.9 (0x00007f1cfa86c000)
libpoppler.so.97 => /usr/lib/x86_64-linux-gnu/libpoppler.so.97 (0x00007f1cfa527000)
libjson-c.so.4 => /usr/lib/x86_64-linux-gnu/libjson-c.so.4 (0x00007f1cfa515000)
libfreexl.so.1 => /usr/lib/x86_64-linux-gnu/libfreexl.so.1 (0x00007f1cfa50a000)
libqhull.so.7 => /usr/lib/x86_64-linux-gnu/libqhull.so.7 (0x00007f1cfa2ae000)
libgeos_c.so.1 => /usr/lib/x86_64-linux-gnu/libgeos_c.so.1 (0x00007f1cfa26b000)
libwebp.so.6 => /usr/lib/x86_64-linux-gnu/libwebp.so.6 (0x00007f1cfa002000)
libepsilon.so.1 => /usr/lib/x86_64-linux-gnu/libepsilon.so.1 (0x00007f1cf9fe8000)
libodbc.so.2 => /usr/lib/x86_64-linux-gnu/libodbc.so.2 (0x00007f1cf9f76000)
libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007f1cf9f5e000)
libkmlbase.so.1 => /usr/lib/x86_64-linux-gnu/libkmlbase.so.1 (0x00007f1cf9f3f000)
libkmldom.so.1 => /usr/lib/x86_64-linux-gnu/libkmldom.so.1 (0x00007f1cf9e9e000)
libkmlengine.so.1 => /usr/lib/x86_64-linux-gnu/libkmlengine.so.1 (0x00007f1cf9e64000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f1cf9e36000)
libxerces-c-3.2.so => /usr/lib/x86_64-linux-gnu/libxerces-c-3.2.so (0x00007f1cf9aa3000)
libopenjp2.so.7 => /usr/lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007f1cf9a4d000)
libnetcdf.so.15 => /usr/lib/x86_64-linux-gnu/libnetcdf.so.15 (0x00007f1cf9926000)
libhdf5_serial.so.103 => /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103 (0x00007f1cf95a9000)
libmfhdfalt.so.0 => /usr/lib/libmfhdfalt.so.0 (0x00007f1cf957f000)
libdfalt.so.0 => /usr/lib/libdfalt.so.0 (0x00007f1cf94da000)
libogdi.so.4.1 => /usr/lib/libogdi.so.4.1 (0x00007f1cf94be000)
libgif.so.7 => /usr/lib/x86_64-linux-gnu/libgif.so.7 (0x00007f1cf94b3000)
libCharLS.so.2 => /usr/lib/x86_64-linux-gnu/libCharLS.so.2 (0x00007f1cf9462000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f1cf93dd000)
libgeotiff.so.5 => /usr/lib/x86_64-linux-gnu/libgeotiff.so.5 (0x00007f1cf93a8000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f1cf9327000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f1cf92ef000)
libcfitsio.so.8 => /usr/lib/x86_64-linux-gnu/libcfitsio.so.8 (0x00007f1cf8ff0000)
libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x00007f1cf8f9e000)
libproj.so.15 => /usr/lib/x86_64-linux-gnu/libproj.so.15 (0x00007f1cf8caf000)
libdapclient.so.6 => /usr/lib/x86_64-linux-gnu/libdapclient.so.6 (0x00007f1cf8c67000)
libdap.so.25 => /usr/lib/x86_64-linux-gnu/libdap.so.25 (0x00007f1cf8ac9000)
libspatialite.so.7 => /usr/lib/x86_64-linux-gnu/libspatialite.so.7 (0x00007f1cf853a000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1cf84c7000)
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f1cf8436000)
libfyba.so.0 => /usr/lib/x86_64-linux-gnu/libfyba.so.0 (0x00007f1cf83de000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f1cf8224000)
libmysqlclient.so.21 => /usr/lib/x86_64-linux-gnu/libmysqlclient.so.21 (0x00007f1cf7b2e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1cf7b0b000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1cf7aef000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f1cf7817000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1cf7811000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1cf7630000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1cf74e1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1cfc025000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1cf74c6000)
libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007f1cf7457000)
liblapack.so.3 => /usr/lib/x86_64-linux-gnu/liblapack.so.3 (0x00007f1cf6db3000)
libhdf5_serial.so.10 => not found
libsz.so.2 => /usr/lib/x86_64-linux-gnu/libsz.so.2 (0x00007f1cf6dae000)
libarpack.so.2 => /usr/lib/x86_64-linux-gnu/libarpack.so.2 (0x00007f1cf6d66000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f1cf6ca7000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f1cf6c5e000)
liblcms2.so.2 => /usr/lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007f1cf6c03000)
libnss3.so => /usr/lib/x86_64-linux-gnu/libnss3.so (0x00007f1cf6ab4000)
libsmime3.so => /usr/lib/x86_64-linux-gnu/libsmime3.so (0x00007f1cf6a84000)
libnspr4.so => /usr/lib/x86_64-linux-gnu/libnspr4.so (0x00007f1cf6a44000)
libgeos-3.8.0.so => /usr/lib/x86_64-linux-gnu/libgeos-3.8.0.so (0x00007f1cf6879000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f1cf686e000)
libminizip.so.1 => /usr/lib/x86_64-linux-gnu/libminizip.so.1 (0x00007f1cf6663000)
liburiparser.so.1 => /usr/lib/x86_64-linux-gnu/liburiparser.so.1 (0x00007f1cf6644000)
libicuuc.so.66 => /usr/lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f1cf645e000)
libhdf5_serial_hl.so.100 => /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100 (0x00007f1cf6437000)
libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f1cf638c000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f1cf6363000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f1cf6155000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f1cf6142000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f1cf60af000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f1cf6060000)
libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f1cf600a000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f1cf5ee1000)
libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f1cf5eb8000)
libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f1cf5e97000)
librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f1cf5e75000)
libssh.so.4 => /usr/lib/x86_64-linux-gnu/libssh.so.4 (0x00007f1cf5e07000)
libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f1cf5df4000)
libnettle.so.7 => /usr/lib/x86_64-linux-gnu/libnettle.so.7 (0x00007f1cf5dba000)
libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f1cf5be4000)
liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f1cf5bd3000)
libbrotlidec.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f1cf5bc3000)
libfyut.so.0 => /usr/lib/x86_64-linux-gnu/libfyut.so.0 (0x00007f1cf5bb7000)
libfygm.so.0 => /usr/lib/x86_64-linux-gnu/libfygm.so.0 (0x00007f1cf5bae000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f1cf5b92000)
libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f1cf58ca000)
libaec.so.0 => /usr/lib/x86_64-linux-gnu/libaec.so.0 (0x00007f1cf58bf000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f1cf58b6000)
libnssutil3.so => /usr/lib/x86_64-linux-gnu/libnssutil3.so (0x00007f1cf5883000)
libplc4.so => /usr/lib/x86_64-linux-gnu/libplc4.so (0x00007f1cf587c000)
libplds4.so => /usr/lib/x86_64-linux-gnu/libplds4.so (0x00007f1cf5877000)
libicudata.so.66 => /usr/lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f1cf3db4000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f1cf3cd7000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f1cf3ca6000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f1cf3c9f000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f1cf3c90000)
libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f1cf3c71000)
libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f1cf3c2c000)
libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f1cf3aaa000)
libhogweed.so.5 => /usr/lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007f1cf3a72000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f1cf39ee000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f1cf38b6000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f1cf38a0000)
libbrotlicommon.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f1cf387d000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f1cf3833000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f1cf382c000)
libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f1cf381e000)
libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f1cf378b000)
libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f1cf36e4000)
libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f1cf36ac000)
libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f1cf3693000)
libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007f1cf3687000)
libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f1cf365b000)
libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f1cf3649000)
libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f1cf35fb000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f1cf35c0000)

答案1

在聊天过程中,我们发现存储库有些混乱,我们使用以下方法进行修复:

sudo add-apt-repository -r ppa:ubuntugis/ppa

并根据以下情况固定到 QGIS 的路径手册

然后删除旧的东西

sudo apt-get purge $(dpkg -l | grep ^rc | awk '{print $2}')

但问题是由 libarmadillo9 库的错误版本引起的。存储库提供 9.800,而系统有 9.400。

因此我们确定了这一点并删除了该库:

sudo rm -v /usr/lib/x86_64-linux-gnu/libarmadillo.so.9 /usr/lib/x86_64-linux-gnu/libarmadillo.so.9.400.3

sudo apt-get install --reinstall libarmadillo9 libarmadillo-dev

最终使 GDAL 运行起来。


使用的工具:

  1. ldd检查库的一致性;
  2. dpkg从软件包外部获取库(参见此问答方法)。

相关内容