Robotics StackExchange | Archived questions

Can't install ros 2 on ubuntu 22.04

E: Unable to locate package ros-humble-desktop

get a similar message for ros-humble-ros-base

I followed the install code exactly (copy and paste) from the ros.org install docs

Asked by Johnboy on 2022-12-05 12:01:26 UTC

Comments

Hi, ROS2 Humble is targeted for Ubuntu Jammy(22.04) and not 20.04, so you may either choose to upgrade to jammy via dist-upgrade or use containers as mentioned here.

Asked by sampreets3 on 2022-12-06 08:16:00 UTC

I went back and checked. I am using ubuntu 22.04.1 LTS jammy

sorry for the mistake in my original post. still have the same problem

Asked by Johnboy on 2022-12-06 10:47:54 UTC

Do you have multiverse enabled in the "Software & Updates"?

Asked by ljaniec on 2022-12-06 11:01:40 UTC

Well, can't do "Software & Updates" on server version(no gui) but I did the following a CL $ sudo add-apt-repository universe $ sudo add-apt-repository multiverse $ sudo add-apt-repository restricted

I then went back to Humble install instruction and tried again (all copy and paste). Still get the same error pi@raspberrypi:~$ sudo apt install ros-humble-ros-base Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package ros-humble-ros-base pi@raspberrypi:~$

Asked by Johnboy on 2022-12-06 11:42:08 UTC

Can you tell us the output of the following command from the command line?

$sudo apt-cache search ros-humble

Asked by Andromeda on 2022-12-06 16:43:39 UTC

5 second pause like it's searching and then just the terminal prompt. No results.

Asked by Johnboy on 2022-12-06 17:10:44 UTC

Maybe a small thing, but can you verify that you can access the internet from your RPi? Usually when I get the unable to locate package error, it's because I am not connected to the internet. A good sign of the internet working fine would be when you run sudo apt update && sudo apt upgrade, and you would be able to install/upgrade the packages.

Asked by sampreets3 on 2022-12-07 04:04:55 UTC

Exactly, @sampreets3 thought that same thing. @Johnboy: it looks like a problem with your system (OS) and/or internet connection and not a ROS issue. Try what @sampreets suggested and if you get some errors trying pinging external websites:

$ping -n 4 www.google.com
$ping -n 4 1.1.1.1

Asked by Andromeda on 2022-12-07 04:35:59 UTC

Maybe important to state here: if #q410179 is about the same issue OP experiences, (s)he is attempting to install Humble on an RPi 3.

Asked by gvdhoorn on 2022-12-07 04:51:57 UTC

ping with the '4' has no response. if I remove the '4' I get the following. Last login: Wed Dec 7 08:17:45 2022 from 192.168.0.137 pi@raspberrypi:~$ pi@raspberrypi:~$ ping -n www.google.com PING www.google.com (172.217.164.68) 56(84) bytes of data. 64 bytes from 172.217.164.68: icmp_seq=1 ttl=113 time=26.9 ms 64 bytes from 172.217.164.68: icmp_seq=2 ttl=113 time=29.7 ms 64 bytes from 172.217.164.68: icmp_seq=3 ttl=113 time=28.6 ms 64 bytes from 172.217.164.68: icmp_seq=4 ttl=113 time=29.8 ms 64 bytes from 172.217.164.68: icmp_seq=5 ttl=113 time=28.0 ms 64 bytes from 172.217.164.68: icmp_seq=6 ttl=113 time=28.7 ms 64 bytes from 172.217.164.68: icmp_seq=7 ttl=113 time=30.2 ms 64 bytes from 172.217.164.68: icmp_seq=8 ttl=113 time=30.7 ms ^C --- www.google.com ping statistics --- 8 packets transmitted, 8 received, 0% packet loss, time 7012ms rtt min/avg/max/mdev = 26.902/29.078/30.698/1.189 ms pi@raspberrypi:~$ also apt-get update && apt-get install seems to work fine

Asked by Johnboy on 2022-12-07 09:21:12 UTC

@Johnboy My mistake, I apologize: the n is wrong, it should be c (n works in windows). Please try:

$ping -c 4 www.google.com
$ping -c 4 1.1.1.1

Asked by Andromeda on 2022-12-07 17:35:32 UTC

ping -c 4 ... worked fine 4 transmits - 4 packets received. thanks for helping. I ordered a pi 4. I can install a gui then and maybe I'll have more luck

Asked by Johnboy on 2022-12-08 10:32:57 UTC

Answers

Why buy an RPi 4? The 3 should be able to run things just fine (depending on what you want to do).

I'd suggest checking whether you're running a 64bit OS / version of Ubuntu. If you aren't, there are no debian packages available for your platform. See REP 2000: only arm64 Jammy gets binary packages, so apt would not find any ros-humble-* packages, as there aren't any.

Asked by gvdhoorn on 2022-12-08 11:51:52 UTC

Comments

That may be the answer. I am running 32bit ubuntu. Burning 64 bit now. I'll let you know if that works. Thanks

Asked by Johnboy on 2022-12-08 15:45:28 UTC

running on 64 bit now. I am able to install ros2 Humble. Thanks all. I tried to install Lubuntu but no joy. The tests on the site seems to use turtlesim and without a gui that does not appear to run. Somewhere I saw a simple test where you open 2 cli sessions and had one talk and one listen but I can'r seem to find it now. But, I'll keep searching. Thanks for all the help.

Asked by Johnboy on 2022-12-09 12:55:52 UTC

I think you are after example listener and chatter: https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html#try-some-examples

Asked by ljaniec on 2022-12-11 12:14:56 UTC