How to uninstall opencv in Ubuntu?

26,553

Solution 1

You can also uninstall by going to the "build" folder directory of opencv from terminal, and execute the following

make uninstall
cd ..
sudo rm -r build
sudo rm -r /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*

Solution 2

I remember I used this command a while ago to remove all opencv related things. It is interactive which promote you to remove the file. choose y or n depending.Take your time and be-careful

$> sudo find / -name "*opencv*" -exec rm -i {} \;
Share:
26,553
user1764367
Author by

user1764367

Updated on July 14, 2020

Comments

  • user1764367
    user1764367 almost 4 years

    I have the following system:

    Linux 64 bit LTS 12.04

    1. I have multiple installations of opencv library on the system.
    2. I want to know the procedure to remove all opencv libraries from the system.
    3. I am having trouble while executing my program through Eclipse IDE.

    Though I can build the project when I try to execute it, it gives the following error:

    OpenCV Error: Assertion failed (k == STD_VECTOR_MAT) in release, file /build/buildd    /opencv-2.3.1/modules/core/src/matrix.cpp, line 1364
    terminate called after throwing an instance of 'cv::Exception'
    what():  /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp:1364: error: (-215) k == STD_VECTOR_MAT in function release
    

    Confusing thing is I am not able to find the path specified in the error i.e.

    /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp
    

    I am able to compile the same source code using command line tool gcc and using pkg-config. However I am unable to do the same through eclipse IDE.