# Two OpenCV's are installed (with different versions) and I can't delete all traces of the past one, please help!

Here is what happened: I have had OpenCV 2.4 on a linux system and I also installed another library called libv4l. For some reason after this install, cmake was unable to find OpenCv. So I installed OpenCV 3.0 this time, hoping that it was a compatibility problem or something.

However, OpenCV 2.4 was installed at /usr/lib by default (I used cmake, make, make install) and OpenCV 3.0 was installed at /usr/local/lib.

Now when I try to cmake, I get this warning:

Cannot generate a safe runtime search path for target <projectname> because files in some directories may conflict with libraries in implicit directories:

...list of files that exist both in usr/lib and usr/local/lib and when I ignore the warning and proceed with make, I get the following error:

No rule to make target <an opencv="" file=""> my CMakeLists is as follows:

cmake_minimum_required (version 2.8) project(camera_test)

find_package(OpenCV 3.0.0) #also tried without 3.0.0 set(CMAKE_MODULE_PATH "usr/local/lib/cmake/${CMAKE_MODULE_PATH}") find_package(raspicam REQUIRED) target_link_libraries (camera_test${raspicam_LIBS}) target_link_libraries (camera_test \${opencv_LIBS}) I think my problem is the same with the following pages:

http://stackoverflow.com/questions/92...

However here is the final catch:

I did make uninstall for openCV 3.0, used

sudo find / -name "opencv" -exec rm {} \; and re installed openCV 3.0

but it did not fix my problem. It still thinks there are files at usr/lib although I cant find any files there anymore.

Please suggest me a solution, and I would really appreciate if you can tell briefly me the logic of this thing. I mean, How does it know there was an installed opencv at usr/lib, what trace did I leave? What are the essential files/commands I need to be looking for/executing in such cases.

Thanks a lot, I really appreciate your help.

edit retag close merge delete