Ubuntu 18.04 + Cuda9.0 + Cudnn7.0.5 + Opencv3.4.1 + Caffe

参考网址:

https://blog.csdn.net/u010801439/article/details/80483036

https://blog.csdn.net/geng333abc/article/details/80151937

注意这几个依赖包一定要手动编译,否则由于ubuntu18.04 的默认编译器和你下载的gcc-4.8,g++-4.8可能编译的不同就会找不到。

sudo apt-get remove libgflags-dev
sudo apt-get remove libgoogle-glog-dev
sudo apt-get remove libleveldb-dev
sudo apt-get remove liblmdb-dev

然后重新安装

# 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

# glog
wget https://github.com/google/glog/archive/v0.3.3.tar.gz
tar zxvf v0.3.3.tar.gz
cd glog-0.3.3
./configure
make && make install

# lmdb
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make && make install

# libleveldb
wget https://github.com/google/leveldb/archive/v1.19.tar.gz
tar -xzf leveldb-1.19.tar.gz
cd leveldb-1.19
make
sudo mv out-static/libleveldb.* /usr/local/lib
cd include
sudo cp -R leveldb /usr/local/include
sudo ldconfig

 

2969total visits,2visits today

Leave a Reply

Your email address will not be published. Required fields are marked *