ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

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

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

omkard gravatar image

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

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 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

@jarvisschultz, I'm in the same case than @droneguy6374, and indeed, I managed to install noetic but not melodic. But I want to run a rosject that use melodic, how can I install melodic instead of noetic ? The only thing I see is "E: Unable to locate package ros-melodic-desktop-full or ros-melodic-desktop".

Hedwin gravatar image Hedwin  ( 2023-06-03 04:12:06 -0600 )edit

@HedwinREP 0003 lists the target platforms for all ROS releases. If you are on Focal (Ubuntu 20.04), the only version of ROS with required support is Noetic. If you specifically need Melodic, then you can either (a) use a supported Ubuntu version such as Bionic (Ubuntu 18.04), (b) attempt to build Melodic from source on 20.04 (likely a painful process), or (c) ask yourself why you _need_ Melodic and not Noetic and see if there are other ways around this. For (c), for example, it might be that you just need to build a couple of packages from source that were released for Melodic but not Noetic, and this is likely much more appealing than building the entire ROS distribution.

One other thought, you could look into using Docker to more flexibly run ROS versions on whatever OS you are using.

jarvisschultz gravatar image jarvisschultz  ( 2023-06-12 17:23:25 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

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

omkard gravatar image

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

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 -0600 )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 -0600 )edit

thank you its worked with me

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

Hello, I am facing similar issue while installing ROS Noetic on Ubuntu 20.04. Setting up the source list is done. I wanted to know if the command to setup the keys is same and if there is some other issue to fix.

itsBaron gravatar image itsBaron  ( 2023-01-10 00:31:26 -0600 )edit
0

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

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

Question Tools

2 followers

Stats

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

Seen: 76,820 times

Last updated: Mar 03 '20