caffe-ssd bug 解决日志

caffe-ssd bug 解决日志

1.hdf5文件目录找不到

src/caffe/net.cpp:8:18: fatal error: hdf5.h: 没有那个文件或目录

https://github.com/NVIDIA/DIGITS/issues/156

http://www.linuxdiyf.com/linux/21717.html

  • 如果从lib中找到hdf相关文件

通过新建软链接来使hdf5.h 生效。

cd /usr/lib/x86_64-linux-gnu
#建立软链接
sudo ln -s libhdf5_serial.so.100.0.1 libhdf5.so
sudo ln -s libhdf5_serial_hl.so.100.0.0 libhdf5_hl.so

修改 ~/caffe/Makefile.config

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial/
  • 如果没有安装的话,请如下操作
// install 
sudo apt-get install libhdf5-10 libhdf5-serial-dev libhdf5-dev libhdf5-cpp-11
// config path
find /usr -iname "*hdf5.h*"
/usr/include/hdf5/serial/hdf5.h
export CPATH="/usr/include/hdf5/serial/"

2.找不到 -lopenblas

/usr/bin/ld: 找不到 -lopenblas collect2: error: ld returned 1 exit status

https://stackoverflow.com/questions/32353509/usr-bin-ld-cannot-find-lopenblas-error-in-caffe-compilation

可能openblas未安装,或者没有建立软链接

  • 安装openblas

    sudo apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev

或者软链接为正常建立

  • 建立软链接

    ln -s /opt/OpenBLAS/lib/libopenblas.so /usr/lib/libopenblas.so

3.boost 未定义的引用

build_release/lib/libcaffe.so:对‘boost::re_detail_106200::cpp_regex_traits_implementation<char>::transform(char const, char const) const’未定义的引用
.build_release/lib/libcaffe.so:对‘boost::re_detail_106200::cpp_regex_traits_implementation<char>::transform_primary(char const, char const) const’未定义的引用

collect2: error: ld returned 1 exit status

https://www.bountysource.com/issues/44327039-compile-issue-about-boost-and-cv

https://www.questarter.com/q/error-in-compiling-caffe-on-ubuntu-17-04-27_46691614.html

https://stackoverflow.com/questions/17588440/cannot-link-boost-regex

解决方案:

修改Makefile ,line181

加入boost_regex

but 无效

Add boost_regex to LIBRARIES variable in Makefile in case you use Makefile.config compilation, or to find_package(Boost 1.54 REQUIRED COMPONENTS system thread filesystem) line in caffe/cmake/Dependencies.cmake

unsolved

https://bbs.archlinux.org/viewtopic.php?id=223497最后

放弃治疗了。。重新装上原版的caffe。。。

你可能感兴趣的:(系统管理维护)