rosrun command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
rosrun: command not found
or when using sudo you get the following error message
sudo: rosrun: command not found
Solutions to rosrun: command not found
How To Fix rosrun: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu rosrun is provided by rosbash package.
rosbash is:
This package is part of Robot OS (ROS). The rosbash package contains some useful bash functions and adds tab-completion to a large number of the basic ros utilities. The package includes limited support for zsh and tcsh by way of sourcing the roszsh or rostcsh files respectively. It doesn’t provide documentation on these shells, though much of the functionality is similar to the bash shell extensions.
To fix this problem, we can install more using the command below.
sudo apt-get -y install rosbash
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install rosbash.
sudo apt -y install rosbash
Or if you have aptitude installed you can use the following command.
sudo aptitude install rosbash
Summary
In this tutorial we learn how to fix rosrun command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.