In fact, the installation of Caffe has been introduced very clearly, and there is no lack of introduction Caffe article, the reason for this is written because this is a Chinese version, and then I was in the lab server installation encountered a lot of problems, I think Up-and may encounter, so posted out
Caffe Installation Guide under the Linux platform
1. System and Authority
Application platform with Ubuntu 14.04, Ubuntu 12.04, OS X 10.9, and OS x. 10.8, installation requires root access
2. Dependent libraries
A) CUDA 6.5 (recommended), 6.0, 5.5, 5.0 and corresponding CUDA drivers-Lab server installed Cuda6.0:cuda_dir: =/usr/local/cuda-6.0
b BLAS (ATLAS, MKL, Openblas) brackets inside the three selected one-the laboratory has been installed Atlas:atlas: =/usr/lib64/atlas
C OpenCV This will have the corresponding installation instructions, do not need to configure the path
D Boost This will have the corresponding installation instructions below, no configuration path required
e) Glog, gflags, Protobuf,leveldb, Snappy, HDF5, Lmdb these will have the corresponding installation instructions below, protobuf may need to modify the environment variable installation
f) Python (Python 2.7,numpy (>=1.7)) Boost.python, if you don't need visualization, Python doesn't need to be concerned, although the makefile configuration file needs to provide a Python path--The lab has Install python,numpy:python_include: =/usr/local/include/python2.7 \/usr/local/lib/python2.7/site-packages/numpy/core/ Include/numpy
g) Matlab: No use, on the net to a sentence with HDF5 can be combined with MATLAB
h) Cudnn Caffe is the CNN computing module specifically provided by Nvdia, and performance is said to be the best, but it is not significantly improved and is not described here. (need to apply to Nvdia, more trouble, do not know whether the back will open)
Do not introduce only the method of CPU calculation
3. Installation of dependent libraries
A) skip Cuda, BLAS, python,matlab configuration It should be noted that Caffe source, Makefile.config.example, need to change blas:= to Atlas: =
b) Other dependent libraries. The system of the lab server is CentOS, so enter the following instructions to install PROTOBUF, Leveldb,snappy, OpenCV, Boost, HDF5
sudo yum install protobuf-develleveldb-devel snappy-devel opencv-devel boost-devel
However, it should be noted that, because the server in the access to the above dependent library download package will be the error (do not know whether the wall, or because the platform resources to adjust the position), there are errors message as follows
No Package Protobuf-devel available.
Error:nothing Todo
So it's best to install them one at a time to see which dependencies are not installed correctly, and there are snappy, OPENCV, boost, and other ways to install the PROTOBUF,LEVELDB, HDF5
Protobuf: Download Protobuf,make compile, and then to modify the environment variables, the corresponding compilation error keyword is proto-c
HDF5: Online can be down to the RPM installation package, relatively simple without brain
Leveldb: Download a lot of places, but the installation is very worried people. Installation reference http://blog.csdn.net/teethfairy/article/details/32089161 is actually copying include/leveldb to/usr/local/include and corresponding. O To/ Usr/local/bin
4. Compile
A to modify the path of the dependent libraries in the Makefile.config.example file, with Cuda, BLAS (to be renamed to Atlas), Python
b) Implementation of CpMakefile.config.example Makefile.config
C Execute make all& make test
Compile the process of the problem: libstdc++.so.6 error, I was reinstalling the Libstdc++.so.6 library, it is said that the people behind will not encounter the problem.
5. Test Mnist Database
Mnist Database demo is very interesting, through the instruction of the tutorial download dataset, the result file name became garbled, but also to modify, as to what file name, you can refer to the examples/mnist/create_mnist.sh script, and then in examples/ Mnist will appear two folders, which are placed in the training set and test set, and then run the SH train_mnist.sh can be
%----------------------------------------------------2014 11 06 Update split Line-------------------------------------------- -------------%
Landlord found that I summed up before is too general, a lot of details did not say, and Glog and Gflag installation encountered problems did not said, a few days before the installation again, the problem more, simply details are all recorded down
First time Installation:
1. Unzip Caffe-master.zip to CNN folder
2. Position of Cuda/usr/local/cuda-5.5
3. Location of Atlas/usr/lib64/atlas---will complain: Lcblas Library cannot find, modify Makefile.config bottom Library_dir plus/usr/lib64/atlas (this is my lab server problem. , normally you will not encounter, or change the environment variable on it.
4. Python's Location/usr/include/python2.6
/usr/lib64/python2.6/site-packages/numpy/core/include/numpy/
5. Install additional dependent libraries-perform administrator rights
5.1protobuf http://blog.csdn.net/zaitianaoxiang/article/details/7639125
./configure if permission Denied is present, Bash in front of the command
Does not show libraries have beeninstalled in:
/usr/local/lib
Head files Hava been installed in:
/usr/local/include/google/protobuf/
But there's a protobuf library under the/usr/local/lib.
5.2leveldb http://blog.sina.com.cn/s/blog_560e310001015jfx.html
Do the tutorial will compile the error/usr/bin/ld:cannot find–lleveldb
Need to copy the corresponding so file libleveldb.so to/usr/local/lib
5.3HDF5 RPM–IVH filename
5.4snappy OPENCV Boost has been installed.
5.5glog---This looks like it's already installed.
Wgethttps://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
Tar zxvf glog-0.3.3.tar.gz
CD glog-0.3.3
./configure
Make && make install
5.6lmdb do not install the test---seems to have been installed---the problem is not found/usr/local/man need to manually create the man folder
5.7gflag
Https://github.com/schuhschuh/gflags/releases Download installation Package
Unpack, open the appropriate folder
Open INSTALL.txt Follow the tutorial
1.Extract source files.
2. Create build directory and change to it.
3. Run CMake to configure.
4. Build the software using selected Build tool.
5. Test the built software.
6. Install the built files.
...... (Ccmake will appear below.) Command
There will be problems with CMake version requirements, and a lower version of Gflag with 2.0 below
Http://www.onlinedown.net/softdown/171915_2.htm Gflag 1.2 version of the
Bash./configure
Make
Makeinstall
6. Error after running SH train_lenet.sh script
Error while loading shared Libraries:libcudart.so.5.5:cannot open Shared object file:no such file or directory
6.1 http://blog.csdn.net/shenchong721/article/details/21529295 Solving method
6.2 Modify/etc/ld.so.conf, add the path of the Cuda Lib, and then execute Sudoldconfig
An error about Glog
https://github.com/BVLC/caffe/issues/333
Exportld_library_path= $LD _library_path:/usr/local/lib
Afteradding to ld.so.conf, run ldconfig with sudo. Then the runtime linker would beable to find.
7. Also to modify the Mnist file name, garbled problem, and suffix name _ and.
Second installation-New user
1. Modify Makefile.config.example must remember to change Library_path
2. Then there's no problem.
Frequently asked questions: Even the root user may have permission denied errors, which are preceded by a bash in front of the command