centos安装caffe全过程

1、

sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel

其中hdf5-devel和leveldb-devel安装失败

2、

sudo yum install gflags-devel glog-devel lmdb-devel

全部失败,补救如下:

# glog
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure
make && make install
# gflags
wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
cd gflags-master
mkdir build && cd build
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
make && make install
# lmdb
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make && make install

3、sudo yum install atlas-devel #没有用这个

4、sudo yum install python-devel ####

5、hdf5安装

下载https://www.hdfgroup.org/downloads/hdf5/source-code/

            $ gunzip  hdf5-X.Y.Z.tar.gz    #解压缩

        $ tar -xvf hdf5-X.Y.Z.tar
            $ cd hdf5-X.Y.Z
            $ ./configure --prefix=/usr/local/hdf5  #安装路径
            $ make
            $ make check                # run test suite.
            $ make install
            $ make check-install        # verify installation.

参考:http://blog.csdn.net/luoying_1993/article/details/53228473

6、leveldb安装

下载https://github.com/google/leveldb 

                make 

        cd out-shared

cp lib* /usr/local/lib

7、OpencvBLAS安装

将之前解压编译过的文件夹拷贝到新系统。重新编译:

make 

make --PREFIX=/usr/local/ install

8、Anoconda安装

下载https://www.continuum.io/downloads#linux

bash Anaconda2-4.4.0-Linux-x86_64.sh

9、caffe安装

下载git clone --recursive https://github.com/BVLC/caffe

cp Makefile.config.example Makefile.config
# Adjust Makefile.config (for example, if using Anaconda Python, or if cuDNN is desired)
make all
make test
make runtest

10、注意事项

a、hdf5安装中 ./configure --prefix=/usr/local/hdf5,否则加载出错

b、修改Makefile.config

cudnn=1

leveldb=0

cuda path

blas path

将第二次出现的blas path注释掉

c、将所需的lib移动到/usr/lib或者/usr/lib64,否则runtest找不到。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值