1.安装hdf5
下载hdf5-1.8.18.tar.gz
tar -xzf hdf5-1.8.18.tar.gz
cd hdf5-1.8.18
根据cmake_patch.txt中的说明,将hdf5-1.8.18中CMakeLists.txt的第887行的Using改为USING
mkdir build
cd build
sudo cmake ..
sudo make
sudo make install (这一步可以让系统安装hdf5的库)
2.安装torch-hdf5
Ubuntu < 13.04
sudo apt-get install libhdf5-serial-dev hdf5-tools
git clone https://github.com/deepmind/torch-hdf5
cd torch-hdf5
sudo luarocks make hdf5-0-0.rockspec
Ubuntu >= 13.04
sudo apt-get install libhdf5-serial-dev hdf5-tools
git clone https://github.com/deepmind/torch-hdf5 cd torch-hdf5 sudo luarocks make hdf5-0-0.rockspec LIBHDF5_LIBDIR=”/usr/lib/x86_64-linux-gnu/”