Error installing OpenCV-2.4.3 on Ubuntu

When I try to connect to OpenCv-2.4.3 on Ubuntu, I get this error:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please install them or make sure they are installed and tested correctly in the CMake files: CUDA_nvcuvid_LIBRARY (Advanced)

And then I turned off the "with_cuda" option in CMakeLists.txt. After that, I get this warning:

The source directory is the same as the binary directory. "clean" can damage the source tree

I do not have a "makefile" in my build folder, so I cannot install OpenCV-2.4.3.

+4
source share
3 answers

I just fixed it. OS: Linux Mint 13 / 64bit, CUDA 5.0. It should also work on Ubuntu.

The problem is that you need to create a link to libnvcuvid.so located in /usr/lib/nvidia-current/ , from /usr/lib/ .

Please execute this in terminal:

 su -c 'ln -s /usr/lib/nvidia-current/libnvcuvid.so /usr/lib/libnvcuvid.so && ln -s /usr/lib/nvidia-current/libnvcuvid.so.1 /usr/lib/libnvcuvid.so.1' 

Assembly files were created without errors. I would also like to add that you should not use apt-get for OpenCV, since the repositories contain older versions of the library.

+10
source

Where did you do your make clean ?

If you follow the documentation correctly, you will see that it is recommended to create a folder to store everything that will be compiled.

Usushno, you do it by doing

 mkdir build 

You should not have a problem in the following this guide .

As you can see, cmake command:

 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON .. 

The .. at the end is very important because it means you have to execute the command in the directory where you want everything to be built.

If you directly run your cmake in the source directory, you can unzip the package and start over;).

You were right to change the variable for CUDA, especially if you do not have an NVidia graphics card.

The last message you provide is a warning, not an error. And you can solve it by following what I said before.

If you just want to use OpenCV and not be developed for it, you laugh as much as Barnabas, directly using the package manager.

In this case, follows his link.

+3
source

I think this may be an easier and faster way to install OpenCV on Ubuntu: install OpenCV using apt-get .
(You do not need to compile it yourself.)

0
source

Source: https://habr.com/ru/post/1443605/


All Articles