When configuring ROS in the Ubuntu18.04.1 system today, it has been prompted ` E: Unable to locate the package`
Possible problems are as follows:
1. The version of ROS does not correspond to each other. Each different ubuntu system corresponds to a different version of ROS. If the installation is wrong, the above problems will occur. (The second digit of the above command is the version number)
Attached is the relationship between the different versions of the ros system corresponding to the Ubuntu system
Ubuntu version |
ros version |
---|---|
Ubuntu 20.04 |
noetic |
Ubuntu 18.04 |
melodic |
Ubuntu16.04 |
kinetic |
Ubuntu 14.04 |
indigo |
2. The software source is not added, the solution is as follows:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
After adding the software source, set the key
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
Then update the source address again:
sudo apt-get update
Then install it without any problem
Thanks blogger: