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

Preferred method to install catkin on Debian stretch

asked 2017-05-27 22:31:40 -0500

jhalbrecht gravatar image

Fairly new to ROS haven't looked at it in a year. This time around I was happy to see it installed via packages to Debian rather than installing a pre configured distribution .ISO, I have Debian 9 aka stretch installed on an old HP tx2000. I have ros installed by including

jeffa@lunar:~$ uname -a
Linux lunar 4.9.0-2-amd64 #1 SMP Debian 4.9.18-1 (2017-03-30) x86_64 GNU/Linux

root@lunar:/etc/apt/sources.list.d# cat ros-latest.list
deb stretch main

I followed the directions Debian install of ROS Lunar apt-get install ros-lunar-desktop-full

Should I install catkin from packages? or build catkin from source? I tried both attempting building from source first then tried with apt-get

[ 19%] Built target pch_Generate_opencv_surface_matching
Scanning dependencies of target pch_Generate_opencv_video
[ 19%] Generating precomp.hpp
[ 19%] Generating precomp.hpp.gch/opencv_video_Release.gch
Scanning dependencies of target pch_Generate_opencv_viz
[ 19%] Generating precomp.hpp
[ 19%] Generating precomp.hpp.gch/opencv_viz_Release.gch
In file included from /usr/include/c++/6/ext/string_conversions.h:41:0,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/stdexcept:39,
                 from /usr/include/c++/6/array:39,
                 from /usr/include/c++/6/tuple:39,
                 from /usr/include/c++/6/bits/stl_map.h:63,
                 from /usr/include/c++/6/map:61,
                 from /home/jeffa/ros_catkin_ws/build_isolated/opencv3/install/modules/viz/precomp.hpp:49:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
compilation terminated.
modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/build.make:62: recipe for target 'modules/viz/precomp.hpp.gch/opencv_v               iz_Release.gch' failed
make[2]: *** [modules/viz/precomp.hpp.gch/opencv_viz_Release.gch] Error 1
CMakeFiles/Makefile2:3082: recipe for target 'modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all' failed
make[1]: *** [modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 19%] Built target pch_Generate_opencv_video
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'opencv3':
  Command '['/home/jeffa/ros_catkin_ws/install_isolated/', 'make', '-j2', '-l2']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/jeffa/ros_catkin_ws/build_isolated/opencv3 && /home/jeffa/ros_catkin_ws/install_isolated/ make -j2 -l2

Command failed, exiting.

Then it occurred to me to apt-get install catkin

root@lunar:/etc/apt/sources.list.d# apt-get install catkin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 catkin : Depends: python-catkin-pkg but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

root@lunar:/etc/apt/sources ...
edit retag flag offensive close merge delete



I'm slightly confused: you already seem to have catkin installed (afaik it's going to be installed by default if you install ros-*-desktop-full), and your error output seems to be about opencv3, not catkin.

gvdhoorn gravatar image gvdhoorn  ( 2017-05-28 02:57:22 -0500 )edit

After a lot more reading... yup I have catkin installed. I guess the opencv came from a large number of examples ~96 saved in ~/ros_catkin_ws/src It was the first build to encounter an error.

jhalbrecht gravatar image jhalbrecht  ( 2017-05-29 14:28:02 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-29 14:31:43 -0500

jhalbrecht gravatar image

As pointed out by @gvdhoorn catkin was installed with apt-get install ros-lunar-desktop-full My bad for misunderstanding the catkin workflow.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-05-27 22:31:40 -0500

Seen: 940 times

Last updated: May 29 '17