Catkin command not found

Had almost the same issue when i tried to run this command (please refer to the pics attached).

$ catkin build

Screenshot for solution applied to solve catkin build error
I solved it by installing catkin ROS build system using the command below (references attached in the links and pictures attached). Screenshot for catkin build error

$ sudo apt-get install ros-kinetic-catkin python-catkin-tools 

Probably you forgot to set up the environment after installing ROS.

$ echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

Then, I will assume you want to create a package, so you can follow these steps:

$ mkdir -p path_to_my_workspace/workspace_name/src
$ cd path_to_my_workspace/workspace_name/src
$ catkin_init_workspace
$ cd path_to_my_workspace/workspace_name/
$ catkin_make
$ source path_to_my_workspace/workspace_name/devel/setup.bash

After running these commands your workspace is created, so now you can start adding packages.


If the workspace is setup, you properly sourced ROS as stated above, and if catkin_make works, but catkin build doesn't work do this:

sudo apt install python3-catkin-tools python3-osrf-pycommon

This is a catkin-tools dependency which was delinked in Ubuntu 20.04 so it has to be manually specified to be installed.

Tags:

Ros

Catkin