2
$\begingroup$

I am using ubuntu 22.04 and I am getting the error of unable to locate package when trying to install the ros 2 humble. I followed the instructions on the ros.org page for humble.

The following commands were used to set up the sources.

sudo apt install software-properties-common
sudo add-apt-repository universe

sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

This was all successful

Then I proceeded to try and install the ros 2 packages

sudo apt update
sudo apt upgrade

sudo apt install ros-humble-desktop this part fails sudo apt install ros-humble-ros-base also fails

enter image description here

here is the link for the ros doc

$\endgroup$
2
  • $\begingroup$ What happens when you apt search ros? What you've done so far looks reasonable, so I'd be curious to see if your OS knows about any ROS packages at all. $\endgroup$
    – cst0
    Aug 18, 2023 at 16:12
  • 1
    $\begingroup$ So it turns out since I have an older version of the ras pi 4, armhf, I will need to re flash the sd card for ubuntu 20.04 and try ros noetic. I appreciate you looking into this though $\endgroup$ Aug 18, 2023 at 17:53

1 Answer 1

2
$\begingroup$

(copying my comment on the issue you opened over at github.com/ros2/ros here for visibility)

The screenshot shows you're running 22.04 on an ARMhf platform.

Only Ubuntu on ARMv8 gets .deb packages (ie: packages you can install using apt). ARMhf (or arm32) users need to build ROS 2 from source.

See also REP 2000: ROS 2 Releases and Target Platforms: Humble Hawksbill (May 2022 - May 2027) (ARMv8 is called arm64 in that document).

$\endgroup$
2
  • $\begingroup$ Hello. Thanks for the links and explanation. I am extremely new to this so it clarified a lot. I see that I would need to download the ros2 from the source but there are none available to work on the armhf platform. When I try on the wiki for humble and rolling the instructions both say arm64 is required to install from the source. $\endgroup$ Aug 18, 2023 at 17:48
  • $\begingroup$ It looks like I will have to reflash the sd card with ubuntu 20.04 and try with the ros noetic. The info on the wiki page for ros noetic says it works on the armhf platform. $\endgroup$ Aug 18, 2023 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.