rosversion command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
rosversion: command not found
or when using sudo you get the following error message
sudo: rosversion: command not found
Solutions to rosversion: command not found
How To Fix rosversion: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu rosversion is provided by python3-rospkg package.
python3-rospkg is:
This package is part of Robot OS (ROS). It is a library for retrieving information about ROS packages and stacks. The rospkg Python module provides basic utilities for querying information about ROS packages, stacks, and distributions. There are several basic APIs: ROS environment, RosPack/RosStack, OS detection, and distributions.
This package installs the library for Python 3.
To fix this problem, we can install more using the command below.
sudo apt-get -y install python3-rospkg
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install python3-rospkg.
sudo apt -y install python3-rospkg
Or if you have aptitude installed you can use the following command.
sudo aptitude install python3-rospkg
Summary
In this tutorial we learn how to fix rosversion command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.