How to uninstall a package of which two versions are installed?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I currently have a package (opencv) installed twice on my Ubuntu 16.04 system. I only realized this was the case when a Python script ran with Spyder gave me this error:
OSError: libopencv_highgui.so.3.3: cannot open shared object file: No such file or directory
My usr/local/lib
folder now looks like this:
libopencv_aruco.so libopencv_imgproc.so.3.3
libopencv_aruco.so.3.3 libopencv_imgproc.so.3.3.1
libopencv_aruco.so.3.3.1 libopencv_imgproc.so.3.4
libopencv_aruco.so.3.4 libopencv_imgproc.so.3.4.0
libopencv_aruco.so.3.4.1 libopencv_imgproc.so.3.4.1
[...]
The packages were initially installed following OpenCV's official installation guide, relying on cmake
, make
and on sudo make install
commands.
The only build folder on my computer is now that of version 3.4.1
. Running sudo make uninstall
would remove it, but I actually need to remove 3.3.1
instead.
Is there a way to uninstall the earlier version?
Would it be the same as deleting all .3.3
and .3.3.1
files?
Alternatively, is there a way to tell Python to ignore the first installation and only use 3.4.1
?
apt package-management python uninstall
 |Â
show 2 more comments
up vote
0
down vote
favorite
I currently have a package (opencv) installed twice on my Ubuntu 16.04 system. I only realized this was the case when a Python script ran with Spyder gave me this error:
OSError: libopencv_highgui.so.3.3: cannot open shared object file: No such file or directory
My usr/local/lib
folder now looks like this:
libopencv_aruco.so libopencv_imgproc.so.3.3
libopencv_aruco.so.3.3 libopencv_imgproc.so.3.3.1
libopencv_aruco.so.3.3.1 libopencv_imgproc.so.3.4
libopencv_aruco.so.3.4 libopencv_imgproc.so.3.4.0
libopencv_aruco.so.3.4.1 libopencv_imgproc.so.3.4.1
[...]
The packages were initially installed following OpenCV's official installation guide, relying on cmake
, make
and on sudo make install
commands.
The only build folder on my computer is now that of version 3.4.1
. Running sudo make uninstall
would remove it, but I actually need to remove 3.3.1
instead.
Is there a way to uninstall the earlier version?
Would it be the same as deleting all .3.3
and .3.3.1
files?
Alternatively, is there a way to tell Python to ignore the first installation and only use 3.4.1
?
apt package-management python uninstall
How exactly did you install the two versions?
â ceccoemi
Apr 17 at 20:04
@check-emee, I added a couple of lines explaining how
â raggot
Apr 18 at 7:29
Have you tried to reinstallopencv-3.3.1
and then run in the build foldersudo make uninstall
?
â ceccoemi
Apr 18 at 13:32
@check-emee, I have not. It's an option I though of, but the installation I had done followed a particularcmake
configuration which I do not have anymore (long story short: I tried many things, and never got OpenCV to be visible by another package, and this is why I then tried a later version). So even if I cloned a new repository with an older version of OpenCV and rebuilt the program, I'd really don't know if that would work. I also don't know if uninstalling that package would break the new installation. What would happen if I just deleted all the.3.3
files?
â raggot
Apr 18 at 13:45
Yes, maybe the best option is to manually delete all the.3.3
files. Try to find them withmlocate
orfind
and then delete them. A suggestion: have you considered to use a Python virtual environment? I think that is the best and easiest way to deal with different versions of packages.
â ceccoemi
Apr 18 at 13:55
 |Â
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I currently have a package (opencv) installed twice on my Ubuntu 16.04 system. I only realized this was the case when a Python script ran with Spyder gave me this error:
OSError: libopencv_highgui.so.3.3: cannot open shared object file: No such file or directory
My usr/local/lib
folder now looks like this:
libopencv_aruco.so libopencv_imgproc.so.3.3
libopencv_aruco.so.3.3 libopencv_imgproc.so.3.3.1
libopencv_aruco.so.3.3.1 libopencv_imgproc.so.3.4
libopencv_aruco.so.3.4 libopencv_imgproc.so.3.4.0
libopencv_aruco.so.3.4.1 libopencv_imgproc.so.3.4.1
[...]
The packages were initially installed following OpenCV's official installation guide, relying on cmake
, make
and on sudo make install
commands.
The only build folder on my computer is now that of version 3.4.1
. Running sudo make uninstall
would remove it, but I actually need to remove 3.3.1
instead.
Is there a way to uninstall the earlier version?
Would it be the same as deleting all .3.3
and .3.3.1
files?
Alternatively, is there a way to tell Python to ignore the first installation and only use 3.4.1
?
apt package-management python uninstall
I currently have a package (opencv) installed twice on my Ubuntu 16.04 system. I only realized this was the case when a Python script ran with Spyder gave me this error:
OSError: libopencv_highgui.so.3.3: cannot open shared object file: No such file or directory
My usr/local/lib
folder now looks like this:
libopencv_aruco.so libopencv_imgproc.so.3.3
libopencv_aruco.so.3.3 libopencv_imgproc.so.3.3.1
libopencv_aruco.so.3.3.1 libopencv_imgproc.so.3.4
libopencv_aruco.so.3.4 libopencv_imgproc.so.3.4.0
libopencv_aruco.so.3.4.1 libopencv_imgproc.so.3.4.1
[...]
The packages were initially installed following OpenCV's official installation guide, relying on cmake
, make
and on sudo make install
commands.
The only build folder on my computer is now that of version 3.4.1
. Running sudo make uninstall
would remove it, but I actually need to remove 3.3.1
instead.
Is there a way to uninstall the earlier version?
Would it be the same as deleting all .3.3
and .3.3.1
files?
Alternatively, is there a way to tell Python to ignore the first installation and only use 3.4.1
?
apt package-management python uninstall
apt package-management python uninstall
edited Apr 18 at 7:28
asked Apr 17 at 19:03
raggot
1418
1418
How exactly did you install the two versions?
â ceccoemi
Apr 17 at 20:04
@check-emee, I added a couple of lines explaining how
â raggot
Apr 18 at 7:29
Have you tried to reinstallopencv-3.3.1
and then run in the build foldersudo make uninstall
?
â ceccoemi
Apr 18 at 13:32
@check-emee, I have not. It's an option I though of, but the installation I had done followed a particularcmake
configuration which I do not have anymore (long story short: I tried many things, and never got OpenCV to be visible by another package, and this is why I then tried a later version). So even if I cloned a new repository with an older version of OpenCV and rebuilt the program, I'd really don't know if that would work. I also don't know if uninstalling that package would break the new installation. What would happen if I just deleted all the.3.3
files?
â raggot
Apr 18 at 13:45
Yes, maybe the best option is to manually delete all the.3.3
files. Try to find them withmlocate
orfind
and then delete them. A suggestion: have you considered to use a Python virtual environment? I think that is the best and easiest way to deal with different versions of packages.
â ceccoemi
Apr 18 at 13:55
 |Â
show 2 more comments
How exactly did you install the two versions?
â ceccoemi
Apr 17 at 20:04
@check-emee, I added a couple of lines explaining how
â raggot
Apr 18 at 7:29
Have you tried to reinstallopencv-3.3.1
and then run in the build foldersudo make uninstall
?
â ceccoemi
Apr 18 at 13:32
@check-emee, I have not. It's an option I though of, but the installation I had done followed a particularcmake
configuration which I do not have anymore (long story short: I tried many things, and never got OpenCV to be visible by another package, and this is why I then tried a later version). So even if I cloned a new repository with an older version of OpenCV and rebuilt the program, I'd really don't know if that would work. I also don't know if uninstalling that package would break the new installation. What would happen if I just deleted all the.3.3
files?
â raggot
Apr 18 at 13:45
Yes, maybe the best option is to manually delete all the.3.3
files. Try to find them withmlocate
orfind
and then delete them. A suggestion: have you considered to use a Python virtual environment? I think that is the best and easiest way to deal with different versions of packages.
â ceccoemi
Apr 18 at 13:55
How exactly did you install the two versions?
â ceccoemi
Apr 17 at 20:04
How exactly did you install the two versions?
â ceccoemi
Apr 17 at 20:04
@check-emee, I added a couple of lines explaining how
â raggot
Apr 18 at 7:29
@check-emee, I added a couple of lines explaining how
â raggot
Apr 18 at 7:29
Have you tried to reinstall
opencv-3.3.1
and then run in the build folder sudo make uninstall
?â ceccoemi
Apr 18 at 13:32
Have you tried to reinstall
opencv-3.3.1
and then run in the build folder sudo make uninstall
?â ceccoemi
Apr 18 at 13:32
@check-emee, I have not. It's an option I though of, but the installation I had done followed a particular
cmake
configuration which I do not have anymore (long story short: I tried many things, and never got OpenCV to be visible by another package, and this is why I then tried a later version). So even if I cloned a new repository with an older version of OpenCV and rebuilt the program, I'd really don't know if that would work. I also don't know if uninstalling that package would break the new installation. What would happen if I just deleted all the .3.3
files?â raggot
Apr 18 at 13:45
@check-emee, I have not. It's an option I though of, but the installation I had done followed a particular
cmake
configuration which I do not have anymore (long story short: I tried many things, and never got OpenCV to be visible by another package, and this is why I then tried a later version). So even if I cloned a new repository with an older version of OpenCV and rebuilt the program, I'd really don't know if that would work. I also don't know if uninstalling that package would break the new installation. What would happen if I just deleted all the .3.3
files?â raggot
Apr 18 at 13:45
Yes, maybe the best option is to manually delete all the
.3.3
files. Try to find them with mlocate
or find
and then delete them. A suggestion: have you considered to use a Python virtual environment? I think that is the best and easiest way to deal with different versions of packages.â ceccoemi
Apr 18 at 13:55
Yes, maybe the best option is to manually delete all the
.3.3
files. Try to find them with mlocate
or find
and then delete them. A suggestion: have you considered to use a Python virtual environment? I think that is the best and easiest way to deal with different versions of packages.â ceccoemi
Apr 18 at 13:55
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I think that the best way is to completely delete both version 3.4
and 3.3
and reinstall the 3.4
version.
To remove them try with
sudo rm -rf /usr/local/lib/libopencv_*
sudo rm -rf /usr/local/bin/opencv_*
sudo rm -rf /usr/local/include/opencv*
sudo rm -rf /usr/local/lib/pkgconfig/opencv.pc
To check if there are still some opencv components try a search with
sudo updatedb
locate opencv
If you don't have the updatedb
/locate
command I suggest you to install it with sudo apt install mlocate
.
Then try to reinstall OpenCV 3.4
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I think that the best way is to completely delete both version 3.4
and 3.3
and reinstall the 3.4
version.
To remove them try with
sudo rm -rf /usr/local/lib/libopencv_*
sudo rm -rf /usr/local/bin/opencv_*
sudo rm -rf /usr/local/include/opencv*
sudo rm -rf /usr/local/lib/pkgconfig/opencv.pc
To check if there are still some opencv components try a search with
sudo updatedb
locate opencv
If you don't have the updatedb
/locate
command I suggest you to install it with sudo apt install mlocate
.
Then try to reinstall OpenCV 3.4
add a comment |Â
up vote
1
down vote
accepted
I think that the best way is to completely delete both version 3.4
and 3.3
and reinstall the 3.4
version.
To remove them try with
sudo rm -rf /usr/local/lib/libopencv_*
sudo rm -rf /usr/local/bin/opencv_*
sudo rm -rf /usr/local/include/opencv*
sudo rm -rf /usr/local/lib/pkgconfig/opencv.pc
To check if there are still some opencv components try a search with
sudo updatedb
locate opencv
If you don't have the updatedb
/locate
command I suggest you to install it with sudo apt install mlocate
.
Then try to reinstall OpenCV 3.4
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I think that the best way is to completely delete both version 3.4
and 3.3
and reinstall the 3.4
version.
To remove them try with
sudo rm -rf /usr/local/lib/libopencv_*
sudo rm -rf /usr/local/bin/opencv_*
sudo rm -rf /usr/local/include/opencv*
sudo rm -rf /usr/local/lib/pkgconfig/opencv.pc
To check if there are still some opencv components try a search with
sudo updatedb
locate opencv
If you don't have the updatedb
/locate
command I suggest you to install it with sudo apt install mlocate
.
Then try to reinstall OpenCV 3.4
I think that the best way is to completely delete both version 3.4
and 3.3
and reinstall the 3.4
version.
To remove them try with
sudo rm -rf /usr/local/lib/libopencv_*
sudo rm -rf /usr/local/bin/opencv_*
sudo rm -rf /usr/local/include/opencv*
sudo rm -rf /usr/local/lib/pkgconfig/opencv.pc
To check if there are still some opencv components try a search with
sudo updatedb
locate opencv
If you don't have the updatedb
/locate
command I suggest you to install it with sudo apt install mlocate
.
Then try to reinstall OpenCV 3.4
answered Apr 18 at 17:01
ceccoemi
1968
1968
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1025905%2fhow-to-uninstall-a-package-of-which-two-versions-are-installed%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
How exactly did you install the two versions?
â ceccoemi
Apr 17 at 20:04
@check-emee, I added a couple of lines explaining how
â raggot
Apr 18 at 7:29
Have you tried to reinstall
opencv-3.3.1
and then run in the build foldersudo make uninstall
?â ceccoemi
Apr 18 at 13:32
@check-emee, I have not. It's an option I though of, but the installation I had done followed a particular
cmake
configuration which I do not have anymore (long story short: I tried many things, and never got OpenCV to be visible by another package, and this is why I then tried a later version). So even if I cloned a new repository with an older version of OpenCV and rebuilt the program, I'd really don't know if that would work. I also don't know if uninstalling that package would break the new installation. What would happen if I just deleted all the.3.3
files?â raggot
Apr 18 at 13:45
Yes, maybe the best option is to manually delete all the
.3.3
files. Try to find them withmlocate
orfind
and then delete them. A suggestion: have you considered to use a Python virtual environment? I think that is the best and easiest way to deal with different versions of packages.â ceccoemi
Apr 18 at 13:55