caffe installation in ubuntu prerequisite for gpu supportwe need to install cuda as well ubuntu library installation sudo apt-get install - --force-yes build-essential autoconf libtool libopenblas-dev libgflags-dev '-libgoogle-glog-dev libopencv-dev protobuf-compiler libleveldb-dev liblmdb-dev libhdf -dev libsnappy'-dev libboost-all-dev libssl-dev sudo apt-get install lsb-core sudo apt-get install libyaml-cpp-dev above should work fine if something went wrong then use belowsudo apt-get install libhdf sudo apt-get install libglogsudo apt install libgoogle-glog-dev sudo apt install libboostsudo apt-get install libleveldbsudo apt-get install liblmdbsudo apt-get install libopenblascuda installation download and install cuda (cuda- can be downloaded from cuda- -download-archive?target_os=linux&target_arch= &target_distro=ubuntu&target_version &target_type=deblocalextract cuda-repo-ubuntu-local_- _amd deb and run the below commands sudo dpkg - cuda-repo-ubuntu-local_- _amd deb (press tab after cuda-repo and then look for pub filesudo apt-key add /var/cuda-repo- - -local/ fa af pub sudo apt-get update sudo apt-get install cuda install cudnndownload cudnn (dec )for cuda cudnn library for linuxwhich is available at below linkextract cudnn- -linux- - tgz and run below commands (do not go inside the extracted folder 'cuda'sudo cp cuda/include/cudnn /usr/local/cuda/include (continues on next page