E: Unable to locate package ros-melodic-desktop-full or ros-melodic-desktop
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!
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 runsudo apt update
to download an up-to-date list of available packages.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.
Hi @jarvisschultz, I did the following which added me the ros-latest.list.
I then ran
and tried installing ros again.
Worked like charm.
Thank you.
Glad you figured it out. As I suspected, it sounds like the file was missing.
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#...
Are you using ROS
melodic
ornoetic
? Yourros-latest.list
seems to indicate you are using Ubuntufocal
which should use Noetic by default yet you are trying to install a package frommelodic
. Maybe trysudo 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, 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".
@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.