ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Unable to install ROS2 Galactic after building OpenCV from source

asked 2022-04-19 22:15:54 -0500

sisaha9 gravatar image

I installed OpenCV from source. However when following the instructions to download ROS2 Galactic (https://docs.ros.org/en/galactic/Inst...) I get the following error in the step

sudo apt install ros-galactic-desktop

Unpacking ros-galactic-desktop (0.9.3-2focal.20220217.193209) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-OBmnnt/081-libopencv-core-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/082-libopencv-flann-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/085-libopencv-imgproc-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/086-libopencv-imgcodecs-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/087-libopencv-videoio-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/089-libopencv-highgui-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/090-libopencv-ml-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/091-libopencv-features2d-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/092-libopencv-calib3d-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/104-libopencv-dnn-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/105-libopencv-objdetect-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/106-libopencv-photo-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/107-libopencv-video-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/108-libopencv-shape-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/109-libopencv-stitching-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/110-libopencv-superres-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/111-libopencv-videostab-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/113-libopencv-contrib-dev_4.2.0+dfsg-5_amd64.deb
 /tmp/apt-dpkg-install-OBmnnt/117-libopencv-dev_4.2.0+dfsg-5_amd64.deb
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-20 01:33:53 -0500

aprotyas gravatar image

Looks like the OpenCV binaries in your PATH are clashing with those that get installed with Galactic. Can you try removing those binaries from the PATH when you install Galactic?

edit flag offensive delete link more

Comments

Hi @aprotyas. Would that not download OpenCV with CPU support instead? How would I differentiate b/w the one with GPU and one without

sisaha9 gravatar image sisaha9  ( 2022-04-20 12:24:21 -0500 )edit

You're right, I should've been clearer. My idea was that you can put the original binaries back on top of PATH after you're done with your ROS Galactic installation.

aprotyas gravatar image aprotyas  ( 2022-04-20 15:17:58 -0500 )edit

I don't seem to be able to remove it from PATH. I should add that I am doing this all in a Dockerfile as ROOT. I have tried setting up OpenCV before and after the install but before gives the above error and after tries to uninstall ROS2 Galactic.

sisaha9 gravatar image sisaha9  ( 2022-04-20 23:37:56 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-04-19 22:15:54 -0500

Seen: 186 times

Last updated: Apr 20 '22