感谢支持
我们一直在努力

Ubuntu: HDF5报错: HDF5 header version与HDF5 library不匹配

今天在执行一个用到hdf5的python脚本时,遇到如下错误

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’.
You can, at your own risk, disable this warning by setting the environment
variable ‘HDF5_DISABLE_VERSION_CHECK’ to a value of ‘1’.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.8.11, library is 1.8.9
        SUMMARY OF THE HDF5 CONFIGURATION
        =================================

General Information:
——————-
          HDF5 Version: 1.8.9
          Configured on: Fri Dec 20 12:54:14 CST 2013
          Configured by: ilan@CentOS5x64
        Configure mode: production
            Host system: x86_64-unknown-linux-gnu
          Uname information: Linux centos5x64 2.6.18-348.el5 #1 SMP Tue Jan 8 17:53:53 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
              Byte sex: little-endian
              Libraries:
        Installation point: /opt/anaconda1anaconda2anaconda3

Compiling Options:
——————
              Compilation Mode: production
                    C Compiler: /usr/bin/gcc ( gcc (GCC) 4.1.2 20080704 )
                        CFLAGS:
                      H5_CFLAGS: -std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wformat=2 -Wunreachable-code -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var -O3 -fomit-frame-pointer -finline-functions
                      AM_CFLAGS:
                      CPPFLAGS:
                    H5_CPPFLAGS: -D_POSIX_C_SOURCE=199506L  -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS: -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_BSD_SOURCE
              Shared C Library: yes
              Static C Library: no
  Statically Linked Executables: no
                        LDFLAGS:
                    H5_LDFLAGS:
                    AM_LDFLAGS:
          Extra libraries:  -lpthread -lz -lrt -lm
                Archiver: ar
              Ranlib: ranlib
          Debugged Packages:
            API Tracing: no

Languages:
———-
                        Fortran: no

                            C++: no

Features:
———
                  Parallel HDF5: no
            High Level library: yes
                  Threadsafety: yes
            Default API Mapping: v18
 With Deprecated Public Symbols: yes
        I/O filters (external): deflate(zlib)
        I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
                            MPE: no
                    Direct VFD: no
                        dmalloc: no
Clear file buffers before write: yes
          Using memory checker: no
        Function Stack Tracing: no
                          GPFS: no
      Strict File Format Checks: no
  Optimization Instrumentation: no
      Large File Support (LFS): yes
Bye…
Aborted (core dumped)

 

昨天还好好的,今天怎么就出现了问题。回忆了一下好像昨天更新了anaconda,可能导致了冲突,经查看,确实如此。Anaconda中安装的hdf5库是1.8.9的, 而之前通过pip intall h5py库应该就是1.8.11的, 一山不容二虎,于是把旧版本删除了

sudo pip uninstall h5py

按下回车,果然在系统自带的python下有以前的h5py版本

Uninstalling h5py:
  /usr/local/lib/python2.7/dist-packages/h5py-2.3.1.egg-info
  /usr/local/lib/python2.7/dist-packages/h5py/__init__.py
  /usr/local/lib/python2.7/dist-packages/h5py/__init__.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_conv.so
  /usr/local/lib/python2.7/dist-packages/h5py/_errors.so
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/__init__.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/__init__.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/attrs.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/attrs.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/base.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/base.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/dataset.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/dataset.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/datatype.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/datatype.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/dims.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/dims.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/files.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/files.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/filters.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/filters.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/group.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/group.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/selections.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/selections.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/selections2.py
  /usr/local/lib/python2.7/dist-packages/h5py/_hl/selections2.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/_objects.so
  /usr/local/lib/python2.7/dist-packages/h5py/_proxy.so
  /usr/local/lib/python2.7/dist-packages/h5py/defs.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5a.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5ac.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5d.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5ds.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5f.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5fd.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5g.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5i.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5l.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5o.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5p.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5r.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5s.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5t.so
  /usr/local/lib/python2.7/dist-packages/h5py/h5z.so
  /usr/local/lib/python2.7/dist-packages/h5py/highlevel.py
  /usr/local/lib/python2.7/dist-packages/h5py/highlevel.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/ipy_completer.py
  /usr/local/lib/python2.7/dist-packages/h5py/ipy_completer.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/__init__.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/__init__.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/common.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/common.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_attrs.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_attrs.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_attrs_data.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_attrs_data.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_base.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_base.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_dataset.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_dataset.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_datatype.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_datatype.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_dimension_scales.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_dimension_scales.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_file.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_file.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_group.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_group.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5f.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5f.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5p.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5p.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5t.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_h5t.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_objects.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_objects.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_selections.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_selections.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_slicing.py
  /usr/local/lib/python2.7/dist-packages/h5py/tests/test_slicing.pyc
  /usr/local/lib/python2.7/dist-packages/h5py/utils.so
  /usr/local/lib/python2.7/dist-packages/h5py/version.py
  /usr/local/lib/python2.7/dist-packages/h5py/version.pyc
Proceed (y/n)? y
  Successfully uninstalled h5py

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-04/116452.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Ubuntu: HDF5报错: HDF5 header version与HDF5 library不匹配
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏