运行“sudo apt-get install libhdf5-dev”后,libhdf5.so 存储在哪里?

运行“sudo apt-get install libhdf5-dev”后,libhdf5.so 存储在哪里?

我是 Ubuntu(运行 16.04)的新用户。我需要使用 HDF5,更具体地说:我需要ld -lhdf5能够无错误地运行。

据我所知,应该可以运行。这将按预期sudo apt-get install libhdf5-dev生成文件夹。但是当我运行: 我得到: 当我运行: 我得到最后几行: /usr/include/hdf5/
ld -lhdf5

ld: cannot find -lhdf5

ld -lhdf5 --verbose

==================================================
attempt to open //usr/local/lib/x86_64-linux-gnu/libhdf5.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libhdf5.a failed
attempt to open //lib/x86_64-linux-gnu/libhdf5.so failed
attempt to open //lib/x86_64-linux-gnu/libhdf5.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libhdf5.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libhdf5.a failed
attempt to open //usr/local/lib64/libhdf5.so failed
attempt to open //usr/local/lib64/libhdf5.a failed
attempt to open //lib64/libhdf5.so failed
attempt to open //lib64/libhdf5.a failed
attempt to open //usr/lib64/libhdf5.so failed
attempt to open //usr/lib64/libhdf5.a failed
attempt to open //usr/local/lib/libhdf5.so failed
attempt to open //usr/local/lib/libhdf5.a failed
attempt to open //lib/libhdf5.so failed
attempt to open //lib/libhdf5.a failed
attempt to open //usr/lib/libhdf5.so failed
attempt to open //usr/lib/libhdf5.a failed
attempt to open //usr/x86_64-linux-gnu/lib64/libhdf5.so failed
attempt to open //usr/x86_64-linux-gnu/lib64/libhdf5.a failed
attempt to open //usr/x86_64-linux-gnu/lib/libhdf5.so failed
attempt to open //usr/x86_64-linux-gnu/lib/libhdf5.a failed
ld: cannot find -lhdf5

这些地方都不包含这个文件或类似的东西。有人能帮我找到它应该放在哪里吗?

答案1

特定库的位置位于运行

dpkg -L libhdf5-dev

对于我的安装来说,它位于

/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so

相关内容