ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
1

E: Unable to locate package ros-melodic-desktop-full or ros-melodic-desktop

asked 2020-03-03 12:13:40 -0500

omkard gravatar image

updated 2020-03-03 12:15:37 -0500

I have Ubuntu 18.04 running on my machine and unable to install ros-melodic.

When I run this command "sudo apt-get install ros-melodic-desktop-full", I am getting this following error:

Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package ros-melodic-desktop-full

I have even tried using aptitude and I still get the same unable to locate error. I have also tried downloading with and without -full and other flags. Still no use.

Please help!

edit retag flag offensive close merge delete

Comments

1

Please add the output of cat /etc/apt/sources.list.d/ros-latest.list to your original question. Likely the issue is that this file is missing or incorrect, or perhaps that you have not run sudo apt update to download an up-to-date list of available packages.

jarvisschultz gravatar image jarvisschultz  ( 2020-03-03 12:26:12 -0500 )edit

Hi @jarvisschultz,

I have run sudo apt update and When I cd into /etc/apt/sources.list.d,I do not see ros-latest.list.

Is this the issue?

Please advise.

omkard gravatar image omkard  ( 2020-03-03 13:35:43 -0500 )edit
1

Hi @jarvisschultz, I did the following which added me the ros-latest.list.

      echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ros-latest.list

I then ran

 sudo apt update

and tried installing ros again.

Worked like charm.

Thank you.

omkard gravatar image omkard  ( 2020-03-03 13:41:00 -0500 )edit

Glad you figured it out. As I suspected, it sounds like the file was missing.

jarvisschultz gravatar image jarvisschultz  ( 2020-03-03 16:41:27 -0500 )edit

hi @jarvisschultz, i am having the exact same issue as @omkard. I have tried the solution and get this line: "deb http://packages.ros.org/ros/ubuntu focal main"

What does it mean and why doesn't the following command work: "sudo apt install ros-melodic-desktop-full" from https://github.com/PX4/PX4-Avoidance#...

droneguy6374 gravatar image droneguy6374  ( 2021-12-02 13:13:35 -0500 )edit

Are you using ROS melodic or noetic? Your ros-latest.list seems to indicate you are using Ubuntu focal which should use Noetic by default yet you are trying to install a package from melodic. Maybe try sudo apt install ros-noetic-desktop-full. If this doesn't clear things up, perhaps it's best to open your own question following the support guidelines: https://wiki.ros.org/Support

jarvisschultz gravatar image jarvisschultz  ( 2021-12-07 14:07:23 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-03-03 13:43:17 -0500

omkard gravatar image

updated 2020-03-03 13:47:53 -0500

Solved by doing the following

echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ros-latest.list
edit flag offensive delete link more

Comments

hi, i tried that and when i made sudo apt update i've got
Err:4 http://packages.ros.org/ros/ubuntu bionic InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654 Reading package lists... Done W: GPG error: http://packages.ros.org/ros/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654 E: The repository 'http://packages.ros.org/ros/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

what's now?

vered gravatar image vered  ( 2020-08-06 03:46:27 -0500 )edit
1

You are probably missing the second step

  1. Setup your sources list sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  2. Set up your keys sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  3. Run sudo apt update
  4. Install your ros version sudo apt install ros-melodic-desktop-full
joedavid91 gravatar image joedavid91  ( 2020-11-07 02:20:44 -0500 )edit

thank you its worked with me

Ahmed Ghanem gravatar image Ahmed Ghanem  ( 2022-03-03 11:35:58 -0500 )edit
0

answered 2022-02-04 01:51:45 -0500

You Probably have multiple ros source list in /etc/apt/sources.list.d. Delete all the source list by:

sudo rm -rf ros-latest.list sudo rm -rf ros-melodic.list

And add the sources again from the site. It will now install.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-03-03 12:13:40 -0500

Seen: 37,487 times

Last updated: Mar 03 '20