Ubuntu titanx CUDA8.0+cudnn5.1+Caffe 安装与遇到的报错
来源:互联网 发布:阿里巴巴农村淘宝面试 编辑:程序博客网 时间:2024/06/06 19:05
一、CUDA8.0+CUDNN.5.1
http://www.2cto.com/kf/201610/552429.html
二、anaconda安装
http://www.linuxidc.com/Linux/2016-07/132860.htm
三、参考 (CPU)http://blog.csdn.net/qq_36620489/article/details/73658151
问题汇总:
1、anaconda2/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found
修复:
condainstall libgcc
ImportError: No module named google.protobuf.internal
修复:
protoc --version libprotoc 2.6.1
2、fatal error: caffe/proto/caffe.pb.h: No suchfileordirectory
#include "caffe/proto/caffe.pb.h"
修复:
1)用protoc从caffe/src/caffe/proto/caffe.proto生成caffe.pb.h和caffe.pb.cc
mark@mark-Default-string-Invalid-entry-length-16-Fixed-up-to-11:~/caffe/src/caffe/proto$ protoc --cpp_out=/home/mark/caffe/include/caffe/ caffe.proto
2)) 在caffe/include/caffe目录下新建文件夹,命名为proto,然后把编译出来的caffe.pb.h和caffe.pb.cc放进去,之后,错误消失。
3、Check failed: error == cudaSuccess (8 vs. 0) invalid device function
该错误是由于GPU的运算能力的不匹配所导致的,在makefile。config里改
# CUDA architecture setting: going with all of them.
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_20,code=sm_21 \
-gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50
1.make all -j16 编译时候出现
make: * [.build_release/examples/siamese/convert_mnist_siamese_data.bin] Error 1/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadDirectory@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFWriteEncodedStrip@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFIsTiled@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFOpen@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFSetField@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFWriteScanline@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFGetField@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFScanlineSize@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFNumberOfStrips@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFSetWarningHandler@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFSetErrorHandler@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadEncodedTile@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFReadRGBATile@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFClose@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so: undefined reference toTIFFRGBAImageOK@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0’
collect2: error: ld returned 1 exit status
解决方案:
sudo make all -j16;
sudo make test -j16
2、sudo make runtest
.build_release/tools/caffe
.build_release/tools/caffe: error while loading shared libraries: libhdf5_hl.so.10: cannot open shared object file: No such file or directory
Makefile:532: recipe for target 'runtest' failed
make: *** [runtest] Error 127
解决方案:
将 anaconda lib 的路径添加到环境变量 LD_LIBRARY_PATH中,具体命令为:
1). export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{anaconda_dir}/lib
2). source ~/.bashrc
3、
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
解决方案:
将 makefile 的
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5 opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
改成:
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
sudo make all -j16
sudo make test -j16
会出现警告(nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).)
make runtest
运行结果:成功!
sudo make pycaffe
添加 $ sudo gedit ~/.bashrc
export PYTHONPATH=”/home/name/caffe/python:$PYTHONPATH”
之后编译链接库,打开ipython/python,输入:
$ import caffe
即可调用caffe相应模块了。matlab模块可以直接测试caffe/matlab/+caffe的用例。
- Ubuntu titanx CUDA8.0+cudnn5.1+Caffe 安装与遇到的报错
- 从零开始安装TensorFlow1.0+keras(Ubuntu16.04+CUDA8.0+Cudnn5.1+TITANX)
- Ubuntu16+TitanX+Cuda8 安装 caffe
- 小白玩Caffe——基于Ubuntu14.04+CUDA8.0+cudnn5.1的Caffe安装与MNIST实验
- caffe+cuda8.0+cudnn5.1+Ubuntu16.04安装
- windows+cuda8.0+VS2015+matlab2017b+cudnn5.1安装配置Caffe
- 安装CUDA8.0 cuDNN5.1
- Ubuntu14.04 cuda8.0 opencv3.0安装caffe及遇到的各种报错的解决办法
- ubuntu 16.04 安装显卡驱动 CUDA8.0 cudnn5.1 笔记
- Ubuntu 16.04 系统构建CUDA8.0,CuDnn5.1安装血泪史
- 心酸的Caffe安装之路 环境搭配 Ubuntu16.04+gtx1080+cuda8.0+cudnn5.1+opencv+Anaconda3+caffe
- ubuntu 14 cuda8.0 cudnn5.1 anaconda tensorflow opencv 的安装
- ubuntu kylin 14.06+cuda8+cudnn5+opencv3.1+caffe环境搭建
- win7+1080ti+cuda8.0+cudnn5.0+caffe安装
- 深度学习框架Caffe配置:Ubuntu 16.04+CUDA8.0+cuDNN5.1+OpenCV3.1+Anaconda+Octave4.0.3
- ubuntu16.04+cuda8.0+cudnn5.1 安装
- Ubuntu16.04+cuda8.0+cudnn5.1安装
- ubuntun16.04 +cuda8.0+cudnn5+opencv2.3+python+caffe安装过程中出现的一些问题
- HDU2528-Area(计算凸多边形面积,线段和直线交点)
- 链表面试题
- python爬虫(7)——获取京东商品评论信息
- Codeforces Round #423 (Div. 2) C. String Reconstruction思维 D. High Load 构造
- Spring部分注解记录
- Ubuntu titanx CUDA8.0+cudnn5.1+Caffe 安装与遇到的报错
- Oracle卸载
- Linux系统安装
- 蓝桥杯 ALGO-113 算法训练 数的统计
- shell学习整理笔记
- 关于Java初初学者的各种基本数据类型的定义。
- [OpenGL]纹理贴图实现 总结
- Java中列出目录的树状结构
- 实施微服务架构的关键技术