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

Can't install ros 2 on ubuntu 22.04

asked 2022-12-05 11:01:26 -0600

Johnboy gravatar image

updated 2022-12-06 09:52:22 -0600

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 install docs

edit retag flag offensive close merge delete


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.

sampreets3 gravatar image sampreets3  ( 2022-12-06 07:16:00 -0600 )edit

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

Johnboy gravatar image Johnboy  ( 2022-12-06 09:47:54 -0600 )edit

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

ljaniec gravatar image ljaniec  ( 2022-12-06 10:01:40 -0600 )edit

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:~$

Johnboy gravatar image Johnboy  ( 2022-12-06 10:42:08 -0600 )edit

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

$sudo apt-cache search ros-humble
Andromeda gravatar image Andromeda  ( 2022-12-06 15:43:39 -0600 )edit

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

Johnboy gravatar image Johnboy  ( 2022-12-06 16:10:44 -0600 )edit

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.

sampreets3 gravatar image sampreets3  ( 2022-12-07 03:04:55 -0600 )edit

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
$ping -n 4
Andromeda gravatar image Andromeda  ( 2022-12-07 03:35:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-12-08 10:51:52 -0600

gvdhoorn gravatar image

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.

edit flag offensive delete link more


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

Johnboy gravatar image Johnboy  ( 2022-12-08 14:45:28 -0600 )edit

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.

Johnboy gravatar image Johnboy  ( 2022-12-09 11:55:52 -0600 )edit

I think you are after example listener and chatter:

ljaniec gravatar image ljaniec  ( 2022-12-11 11:14:56 -0600 )edit

Question Tools

1 follower


Asked: 2022-12-05 11:01:26 -0600

Seen: 894 times

Last updated: Dec 06 '22