关于ubuntu下HDF5库的安装和问题(HDF5 library version mismatched error)

$$$HDF5安装

ubuntu:16.10。64位

1.打开官网https://support.hdfgroup.org/HDF5/

选择Download HDF5

关于ubuntu下HDF5库的安装和问题(HDF5 library version mismatched error)

选择所有平台 Source Code (all platforms)

关于ubuntu下HDF5库的安装和问题(HDF5 library version mismatched error)

选择 gzip这个。出来的是hdf5-1.8.19.tar.gz这个版本。

关于ubuntu下HDF5库的安装和问题(HDF5 library version mismatched error)

之后就是解压安装来啦

安装步骤如下:(详细步骤:https://support.hdfgroup.org/ftp/HDF5/current18/src/unpacked/release_docs/INSTALL)

  默认安装路径为/usr/local/lib      


   $sudo tar -zxvf hdf5-X.Y.Z.tar.gz #解压

   $sudo cd hdf5-X.Y.Z
   $sudo  ./configure
   $sudo  make
   $sudo  make check             
   $sudo  make install
   $sudo  make check-install    

出现问题:

Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
'HDF5_DISABLE_VERSION_CHECK' environment variable is set to 1, application will
continue at your own risk.
Headers are 1.8.11, library is 1.8.19
        SUMMARY OF THE HDF5 CONFIGURATION
        =================================

等等一大堆。其他的解决方案和网址:

https://*.com/questions/21738662/hdf5-library-error

https://github.com/ipython/ipython/issues/3031/

其实只用按他说的:export HDF5_DISABLE_VERSION_CHECK=1    就行了