Caffe compilation Problem and solution summary:
When compiling the Caffe code, the previous errors will appear, and there will be a variety of problems:
Question 1:
' Make all' maketest'int'
. build_release/lib/libcaffe.so:undefined reference Tocv::imencode (cv::string const&, Cv::_inputarray const& , std::vector >&, std::vector > const&)'
Cause: There is no build folder in the Caffe code and you need to create a new build folder before compiling:
CD Caffe-master #打开caffe所在文件夹cp Makefile.config.example makefile.config in makefile.configmkdir BUILDCD Buildcmake. Make all-j8 #在build文件夹下进行编译
Cd..
Make Test
-j8 #使用CPU多核同时进行编译
Question 2:
CMake Error at Cuda_compile_generated_lrn_layer.cu.o.cmake:206 (message)
After the successful installation of CUDA, the following error is resolved due to path setup issues, or path conflicts:
1. Under the Caffe folder, view the configuration path by following this command:
sudo find/-name NVCC
2. Use the following command to see if the Cuda path conflict:
$PATH
If the display results have two CUDA environment variables, you need to remove the old path and update the path.
3. Re-set the CUDA environment variable
Adding CUDA environment variables in/etc/profile
path=/usr/local/cuda/Bin: $PATH export PATH
Then log off or restart (because path is re-read from the ~/.bash_profile file after logging off or restarting)
Problem 3:CUDNN Use
after installing cudnn-6.5-linux-x64-v2.tgz, and setting in Makefile.config
1
Turn on CUDNN acceleration, but use the command
Make Test-j8
There was a problem compiling the test, which has not been resolved so far.
Some common commands for Linux are documented and explained:
1. Program Installation
Local Installation command format
sudo dpkg-i softname.deb
Where dpkg is the abbreviation for the Debian package, dpkg commonly used commands are:-I installation;-R Uninstall
The DPKG command is a low-level installation tool, and APT is the dpkg upper-level tool for getting packages from remote and handling the relationships between complex packages.
Common usage of APT, install and uninstall software after apt-get or remove
apt-get install <package>
2. Set the system root password
If you use the CD-ROM to install Ubuntu, follow the Setup Wizard for account, partition and other settings, and in this installation Wizard program is not prompted to root password settings, so after the installation of Ubuntu need to manually set the root password. If you skip the Setup Wizard and click the Install icon on your desktop, you will be prompted to set the root password during the installation process. Of course, if you need to change the root password you can also use the following methods: Open terminal, enter the command in terminal:
sudo passwd root
Next, follow the prompts to set the root password of the system.
[sudo] password for Jjxiaoyan:
Enter a new UNIX password:
Re-enter the new UNIX password:
passwd: Password has been successfully updated
Password:
3. Deleting folders and files
In Ubuntu, some folders can not be deleted by right-clicking, this time you need to use the command to delete.
To delete a file:
cd/usr/local/src #打开文件所在位置sudo rm./file-name #删除文件
To delete a folder:
cd/usr/local/srcsudo rm-r./folder-name
3. Change the file or folder name with a command
sudo mv old filename new file name
4. Using the Display kernel version
Uname A
Some problems and solutions in the use of Ubuntu14.04:
1. Workaround when the kernel is having problems
This problem bothers me for a long time, because dpkg when the program installs the command, this command problem causes the new software to be unable to install, very annoying, looked up a lot of information, finally found the solution.
error message: dpkg: Error occurred while processing: linux-image-extra-3.19.0-28-generic
Linux-image-3.19.0-28-generic
Workaround: The original address (point me) directly 12 floor
Workaround: Back up the information in the DPKG package and update the kernel with the new info information copied to the folder
sudo mv/var /lib/dpkg/info/var / Lib/dpkg/info_old // now rename info folder sudo mkdir/var /lib/dpkg/info Create a new info folder sudo apt-get update // update source sudo apt-get -F Install sudo mv/var /lib/dpkg/info/var/lib/dpkg/info_old//move all files in info to the Info_old folder sudo rm-rf/var/lib/dpkg/info//delete your new info folder from sudo Mv/var/lib/dpkg/info_old/var/lib/dpkg/info//Change the previous Info folder back to the first name
The above command resolves the kernel removal failure and updates the issue.
2.ubuntu14.04 unable to identify hard disk EXFAT partition
Why use the exFAT format? There are two main reasons for this:
1. The three major major operating systems (Linux, MAC, Windows) support the EXFAT format.
2. exFAT supports files larger than 4G.
Under Ubuntu, due to copyright reasons (said), the default does not support the EXFAT format of the U disk, but it is convenient to add support for exFAT:
1, for Ubuntu 14.04 version, directly run the following command can be:
sudo apt-get Install Exfat-utils
The restart takes effect after the installation is complete. (Restart if not restarted)
Caffe System Setup (FAQ solution and problem solving in Ubuntu use)--Continuous update