runtest fails on ubuntu because of libhdf5

707 views
Skip to first unread message

Victor Zhong

unread,
Feb 22, 2015, 2:50:28 AM2/22/15
to caffe...@googlegroups.com
I've managed to install Caffe on my Ubuntu machine, however `make runtest` is failing with the following message:

.build_release/test/test_all.testbin 0 --gtest_shuffle 
.build_release/test/test_all.testbin: error while loading shared libraries: libhdf5_hl.so.8: cannot open shared object file: No such file or directory

The thing is, when I lookup the files associated with a freshly installed libhdf5-serial-dev, I cannot find livhdf5_hl.so.8:

victor@boxy:/usr/lib$ dpkg -L libhdf5-serial-dev | grep hdf5
/usr/include/hdf5.h
/usr/include/hdf5.mod
/usr/include/hdf5_hl.h
/usr/lib/libhdf5.settings
/usr/lib/libhdf5.la
/usr/lib/libhdf5_hl.la
/usr/lib/libhdf5.a
/usr/lib/libhdf5_cpp.a
/usr/lib/libhdf5_fortran.a
/usr/lib/libhdf5_hl.a
/usr/lib/libhdf5_hl_cpp.a
/usr/lib/libhdf5hl_fortran.a
/usr/share/doc/libhdf5-serial-dev
/usr/share/doc/libhdf5-serial-dev/copyright
/usr/lib/libhdf5.so
/usr/lib/libhdf5_cpp.so
/usr/lib/libhdf5_fortran.so
/usr/lib/libhdf5_hl.so
/usr/lib/libhdf5_hl_cpp.so
/usr/lib/libhdf5hl_fortran.so
/usr/share/doc/libhdf5-serial-dev/RELEASE.txt.gz
/usr/share/doc/libhdf5-serial-dev/changelog.Debian.gz

Has anybody seen this before? How do I get around this? We'd like to run some experiments where the data is given in HDF5 format.

Thanks!

SK

unread,
Mar 24, 2015, 3:02:21 PM3/24/15
to caffe...@googlegroups.com
Hi,

I had a similar issue. I am using Ubuntu 12.04. I installed opencv 2.4.10 and Anaconda Python 2.7.8.  Here's what I did to address this issue.

1) Download  hdf5-1.8.13 from  http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/bin/linux-x86_64/. Note that using 1.8.12 resulted in mismatch error between the header and library. So I used 1.8.13. 
2) tar -xvzf to unpack and  browse the lib folder in this distribution  make sure it has libhdf5.so.8.  Then copy the lib folder in this distribution to /usr/lib/hdf5_libs  (you dont need to copy as long as you can point the LD_LIBRARY_PATH to the right folder)
3) Add  /usr/lib/hdf5_libs (change this to your folder where the libhdf5.so.8 libraries are ) to /etc/ld.so.conf. Then run  "sudo  ldconfig"
4) Add  /usr/lib/hdf5_libs to LD_LIBRARY_PATH  in your ~/.bashrc file and source this file.
5) Add  /usr/lib/hdf5_libs to the LIBRARY_DIRS variable in caffe/Makefile.config.   
6) Now run make all, make test, followed by make runtest.

Hope this helps. 
Reply all
Reply to author
Forward
0 new messages