0
$\begingroup$

I am trying to install the ROS 2, iron version on my Ubuntu 22.04.06 version. I am following the official documentation on the website for the installation - ROS 2 Iron Installation documentation.

However, I get the error - E: Unable to locate package ros-iron-desktop, as soon as I give the command sudo apt install ros-iron-desktop. I was getting the same error as I tried to install the humble version.

Others who had faced the same problem solved it by switching to 22.04 version of Ubuntu, I however am using the same, so that wasn't the main issue I guess.

$\endgroup$

2 Answers 2

0
$\begingroup$

Since you are running a compatible OS, this generally means that you have not enabled the required repositories or that you have not updated your cache after adding the required repositories (accomplished by running sudo apt update). If you did run those commands then go back and confirm that there were no typos or errors.

$\endgroup$
1
  • $\begingroup$ I did give those commands. In fact executed every line of command as given in the documentation. For verification, I try follow the same procedure on my other laptop, but still got the same error. $\endgroup$ Commented Mar 26 at 8:03
0
$\begingroup$

Try to remove source list with the command below and reinstall again

sudo rm /etc/apt/sources.list.d/ros2.list
sudo apt update
sudo apt autoremove
# Consider upgrading for packages previously shadowed.
sudo apt upgrade
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.