CentOS 无网安装 caffe 笔记

来源:互联网 发布:演员不演戏去上班知乎 编辑:程序博客网 时间:2024/05/14 12:26

可能用到的命令:

rpm -qa | sort 列出已经安装好的包

ls -a 显示当前目录下包括隐藏文件在内的所有文件

alien -r 文件.deb 文件.rpm generated  deb 安装包转为 rpm 安装包

rpm -ivh 文件.rpm 安装rpm包

find / -name 文件 搜索指定文件位置

ps aux | grep -i 名字 列出名字对应的进程

kill -9 id 停止 id 对应的进程

lspci -vnn | grep VGA -A 12  或者直接 lspci | grep VGA 显示Linux 配置信息

lshw -C display 同上


alien 安装

http://ftp.de.debian.org/debian/pool/main/a/alien

tar -azvf ...

cd ...

perl Makefile.PL 

make && make install

yum -y install rpm-build


gcc 4.4.7第一种安装方式


cd gmp  
./configure --prefix=/usr  
sudo make && make install  
  
  
cd mpfr  
./configure --prefix=/usr  
sudo make && make install  
  
  
cd mpc  
./configure --prefix=/usr  
sudo make && make install 


#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib


 ./configure --enable-checking=release --enable-languages=c,c++ --disable-multilib


make -j4
make install


 gcc -v


gcc 第二种安装方式(没试过)
http://vault.centos.org/6.3/os/x86_64/Packages/
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh cpp-4.4.6-4.el6.x86_64.rpm
rpm -ivh kernel-headers-2.6.32-279.el6.x86_64.rpm
rpm -ivh glibc-headers-2.12-1.80.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.80.el6.x86_64.rpm
rpm -ivh gcc-4.4.6-4.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.6-4.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.6-4.el6.x86_64.rpm


cmake
cd cmake-3.3.2 
./bootstrap
gmake
make install


opencv2.4.13.3
cd opencv2.....
 
mkdir build
cd build
cmake ..
make -j8
sudo make install


加下面的语句到.bashrc
echo "#ADD OpenCV in PKG_CONFIG" >> ~/.bashrc
echo "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}" >> ~/.bashrc
echo "export PKG_CONFIG_PATH" >> ~/.bashrc


pkg-config --modversion opencv


CMake Error at CMakeLists.txt:11 (message):
  
 
  FATAL: In-source builds are not allowed.
 
         You should create separate directory for build files.
 
 
 
-- Configuring incomplete, errors occurred!
则应该是在代码根目录下直接执行过 cmake,导致根目录下生成了 CMakeCache.txt,需要删除 CMakeCache.txt再次执行编译即可


boost 1.59.0
https://www.cnblogs.com/oracleloyal/p/6060779.html


./bootstrap.sh
./b2 install  Boost将编译Release版本的库文件,把头文件安装到/usr/local/include,库文件安装到/usr/local/lib
或者 ./b2 --buildtype=complete install
使用buildtype选项指定编译类型,对Boost的完整编译,安装所有调试版、发行版的静态库和动态库
./b2 link=static install       #编译安装所有静态库


atlas3.10.3.tar.bz2


mkdir build
cd build
../configure --shared
make
make install


gflags-2.1


 cd gflags-2.1.1
mkdir build
cd build/
cmake .. -DCMAKE_INSTALL_PREFIX=/home/amcool/local/gflags-2.1.
make
make install



tar xzf gflags-$version-source.tar.gz
cd gflags-$version
mkdir build && cd build
ccmake ..


  - Press 'c' to configure the build system and 'e' to ignore warnings.
  - Set CMAKE_INSTALL_PREFIX and other CMake variables and options.
  - Continue pressing 'c' until the option 'g' is available.
  - Then press 'g' to generate the configuration files for GNU Make.


make
make test    (optional)
make install (optional)


glog-master.zip
./autogen.sh && ./configure && make && make install


hdf5-1.8.17


wget    //这个地址你们自行替换,这个事 1.8.3版本的
tar -zxvf hdf5-1.8.3.tar.gz
./configure --prefix=/usr/local/hdf5-1.8.3/
make
make check                # run test suite.
make install
make check-install        # verify installation.


leveldb-master.zip
cd leveldb-master && make all
cp out-shared/libleveldb.so* /usr/local/lib && cp -R include/* /usr/local/include
出现如下错误: 
./leveldb: error while loading shared libraries: libleveldb.so.1: cannot open shared object file: No such file or directory


解决办法: 
在/etc/ld.so.conf.d的文件夹中 新建一个文件,命名为level.conf,用vim打开它,加入/usr/local/lib这一行,保存之后,再运行:#/sbin/ldconfig –v更新一下配置即可。


lmdb-mdb.master.zip
unzip lmdb_mdb.master.zip
cd lmdb_mdb.master/libraries/liblmdb
make && make install


protobuf
 ./configure --prefix=/home/work /protobuf/  


    make && make install


    编译成功后将export PATH= /home/work /protobuf/bin:$PATH加入到环境变量中


    最后输入  protoc --version命令,如显示libprotoc 2.5.0则安装成功


libevent
./configure –prefix=/usr
make
make install


lua-5.2.0


yum -y install readline-devel ncurses-devel


tar -zxvf readline-6.2.tar.gz 
cd readline-6.2
./configure           //这个地方一定要指定路径,要不然要报错(一般在/usr/local下用软件命名,比如 /usr/local/readline下)
make && make installl


cd lua-5.2.0
make linux
make install


openssl
tar zxvf openssl-0.9.8k.tar.gz
./config --prefix=/usr/local/ssl-0.9.8lk shared zlib-dynamic enable-camellia
make depend
make && make install
openssl version


glib-2.34.3.tar.xz
tar xf glib-2.34.3.tar.xz
cd glib-2.34.3
./configure --prefix=/usr/local/glib --with-pcre=/usr/local/pcre/


pcre8.35
tar xf pcre-8.35.tar.gz
cd pcre-8.35
./configure --prefix=/usr/local/glib--with-pcre=/usr/local/pcre/

其实最终我没安装成功相关链接

http://blog.csdn.net/wqzghost/article/details/47447377

http://blog.csdn.net/houwenbin1986/article/details/52486342

http://blog.csdn.net/chrisyoung95/article/details/70574844

并提供我所下载的所有先关依赖

链接:https://pan.baidu.com/s/1gfAM9On 密码:6em0