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 --recursivehttps://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找不到。