0
$\begingroup$

Rosanswers logo

Recently I upgraded my Ubuntu from 16.04 to 18.04, thus I reinstalled ROS Melodic after uninstalling Kinetic. roscore and some other basic ROS packages work fine, however when I try to build my workspace with catkin build following error message appears:

CMake Error at /home/user1/projects/catkin_ws/src/custom_package/CMakeLists.txt:10 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "catkin", but
  CMake did not find one.

  Could not find a package configuration file provided by "catkin" with any
  of the following names:

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
  "catkin_DIR" to a directory containing one of the above files.  If "catkin"
  provides a separate development package or SDK, be sure it has been
  installed.


make: *** [cmake_check_build_system] Error 1

The package and workspace was working fine before (on another melodic machine). I tested to create a new empty workspace with catkin init but catkin build still throws the same error message.

I also did source /opt/ros/melodic/setup.bash. My cmake version is 3.10.2

Anyone knows how to solve this? Many thanks!


Originally posted by rfn123 on ROS Answers with karma: 146 on 2020-06-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ok, somehow I could build a new empty workspace with catkin build after I reinstalled the ros-melodic-catkin package. In the old workspace, doing catkin clean then retrying to build then also worked.


Originally posted by rfn123 with karma: 146 on 2020-06-18

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.