CUDA and OPENCV installation issues

Source: Internet
Author: User

Yesterday hand cheap, put cuda and OPENCV environment variable changed, restart login interface input password prompts error, password must be correct, is not into, is very silent. Various solutions have been tried on the web, such as deleting/tmp and./xauthor in command line mode, or changing the environment variables previously changed, and so on.

Finally reinstall the CUDA again, reboot incredibly good. Summed up the reason is due to the original encounter problems CUDA environment variables, resulting in graphics driver failure, at that time, only reported Cuda related Lib failure, after the restart can not enter.

There is the installation of OpenCV and Cuda, you must first install the Cuda and then install OPENCV. If the cuda needs to be reinstalled, then OpenCV will have to CMake and make again.

1, cuda installation See my blog: Ubuntu installation cuda7.5 and Caffe


2, OPENCV installation

A, the online most of the tutorial is to download and compile a good installation package, I installed a lot of problems, not as much as their own download compiled, hands-on practice before you can remember to live, very simple. Download the original website opencv:http://opencv.org/


B

CD ~/opencv2.4.10
mkdir release
cd
cmake-d cmake_build_type=release-d cmake_install_prefix=/usr /local.. (Note that there are two points behind)
At this point, if you report the following error:

CMake error at cuda_compile_generated_matrix_operations.cu.o.cmake:206: Error generating
/home/yy/opencv-2.4.9/build/modules/core/cmakefiles/cuda_compile.dir/__/dynamicuda/src/cuda/./cuda_compile_ Generated_matrix_operations.cu.o

MAKE[2]: * * * * [modules/core/cmakefiles/cuda_compile.dir/__/dynamicuda/src/cuda/./cuda_compile_generated_matrix_ OPERATIONS.CU.O] Error 1

MAKE[1]: * * * [Modules/core/cmakefiles/opencv_core.dir/all] Error 2
Make: * * * [ALL] Error 2


Input: "cmake-d cmake_build_type=bulid-d cmake_install_prefix=/usr/local-d cuda_generation=kepler ...", can be resolved.

C

Enter the created temporary directory (<cmake_binary_dir>) and proceed with:make

sudo make install

D
Configure OPENCV parameter settings
sudo gedit/etc/ld.so.conf.d/opencv.conf
add:/usr/local/lib
Use the following command to make it effective:
sudo ldconfig
Input: sudo gedit/etc/bash.bashrc join:
Pkg_config_path= $PKG _config_path:/usr/local/lib/pkgconfig
Export Pkg_config_path

At this point, the OPENCV installation is complete


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.