Ask Your Question

cannot compile - catkin vs. ros-melodic on ubuntu 18.04

asked 2019-05-09 02:33:47 -0500

habakuk39 gravatar image

updated 2019-05-09 10:55:32 -0500

gvdhoorn gravatar image

Hi, I know that this issue is partially redundant but after days of research I cannot find any suitabel answer:

I am usung odroid C2 on Ubuntu 18.04 ( from hardkernel and I am trying to compile

When I install ros melodic exactly like described ( ) I cannot "cd ~/catkin_ws && catkin_make" because there is no catkin installed! (When it was workingly installed beforehand, it gets removed by the ros-meldoc installation.

1.)When I try to (re)install catkin then by sudo apt install catkin, I get the following error message:

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 my 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.

2.) de- and reinstalling python-catkin-pkg does not change anything

3.) ros-melodic-desktop-full obviously fully depends on ros-melodic-catkin which depends on python-catkin-pkg and python-catkin-pkg-modules. The last two conflict with catkin. So how to catkin myahrs_driver?

4.) when I try to

cmake /home/user/catkin_ws/src/myahrs_driver -DATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel -DCMAHE_INSTALL_PREFIX=/home/user/catkin_ws/install -G "Unix Makefiles"

i get hte following error message:

CMake Error at CMakeLists.txt: (10) (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake to fing a package configuration file proviede by "cartkin", but CMake di not find one.
Could not find a package configuration file provided by "catkin" with any of the following names:

Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set "catkin_DIR" ro a diorectory containing on of the above files. If "catkin" provides a separate development package or SDK. be sure it has beenb installed.
--Configuring incomplete, errors occured!

5.) entering "qtcreator" and checking CMakeLists.txt from my ~catkin_ws/src directory containing "git clone i find:


Please help. Is there a possibility for your to up your compiled driver.pkg for melodic, so that I can avoid this catkin issue?


Edit: @gvdhoorn: Sorry, I just tried what you suggested - if I got you right:

1.) got new plain ubuntu 18.04 image - and started from scratch,

2.) got ros-melodic-desktop-full installed without errors and

3.) sudo apt install git

4.) installed NOT catkin !

5.) "mkdir catkin_ws && cd catkin_ws" (empty)

6.) "mkdir src && cd src" then

7.) "git clone

8.) "cd && cd catkin_ws"

9.) cmake /home/~/catkin_ws/src/myahrs_driver -DATKIN_DEVEL_PREFIX=/home/~/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/~/catkin_ws/install -G "Unix Makefiles"

with the same error message like above again:

CMake Error at CMakeLists.txt: (10) (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake ...
edit retag flag offensive close merge delete


When I try to (re)install catkin then by "sudo apt install catkin"

this is most likely the cause of your problems, see wiki/UpstreamPackages.

You'll want to install ros-melodic-catkin. The catkin package is something else.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-09 05:55:38 -0500 )edit

@gvdhoorn: ros-melodic-catkin is installed. It is part of ros-melodic-dektop-full

habakuk39 gravatar image habakuk39  ( 2019-05-09 08:11:57 -0500 )edit

That may be, but I see you writing this:

The last two conflict with catkin.

catkin is not a package you should install. Or at least not if you want to use the packages from

The fact that you get errors complaining about catkinConfig.cmake seem to suggest that some things are not correctly installed.

If catkin is still installed (ie: the package), make sure to remove it, and any of the other packages that it depend(s)(ed) on. There are probably some Python modules that it depended on. You should remove those as well.

Finally: make sure to rm -rf $HOME/catkin_ws/build $HOME/catkin_ws/devel before trying again. CMake caches paths, so it could be that it is looking for the wrong things in the wrong locations.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-09 08:26:38 -0500 )edit

@gvdhoorn: there isn't any trace of CATKIN on this image and it isnt working either! ANY help appreciated

habakuk39 gravatar image habakuk39  ( 2019-05-09 10:41:36 -0500 )edit

ANY help appreciated

please don't do that.

We already know that you need/want help. Otherwise you wouldn't be posting here.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-09 10:54:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-09 10:53:27 -0500

gvdhoorn gravatar image

updated 2019-05-09 10:57:28 -0500

I don't see you doing a source /opt/ros/melodic/setup.bash.

catkin_make is not on the PATH normally, so you need to source the setup file.


9.) cmake /home/~/catkin_ws/src/myahrs_driver -DATKIN_DEVEL_PREFIX=/home/~/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/~/catkin_ws/install -G "Unix Makefiles"

why do you do this?

For normal ROS usage this is very strange. Just run catkin_make in the root of your workspace.

I'd not recommend manually invoking cmake unless you know what you are doing.

edit flag offensive delete link more


@gcdhoorn: Do you know what you are?

habakuk39 gravatar image habakuk39  ( 2019-05-09 14:31:01 -0500 )edit

I don't follow.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-09 14:47:21 -0500 )edit

You are my genius! Thank you so much - you cannot imagine. Your help was worth a galaxy....

habakuk39 gravatar image habakuk39  ( 2019-05-09 15:03:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2019-05-09 02:08:47 -0500

Seen: 2,064 times

Last updated: May 09 '19