0
$\begingroup$

I have ran into an error whilst trying to install ROS2, not sure what to do.

Some background:

  1. I'm running ubuntu version 22.04.3 using a virtual machine.
  2. I'm trying to install ROS 2 Iron (installation process is described here: https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html

This is the command I'm entering in the terminal and the message its returning:

    tempo@Ubuntu:~$ sudo apt install software-properties-common
    sudo add-apt-repository universe
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following additional packages will be installed:
      python3-software-properties software-properties-gtk
    The following packages will be upgraded:
      python3-software-properties software-properties-common
      software-properties-gtk
    3 to upgrade, 0 to newly install, 0 to remove and 64 not to upgrade.
    Need to get 114 kB of archives.
    After this operation, 6,144 B of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Get:1 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 software-properties-common all 0.99.22.8 [14.1 kB]
    Get:2 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 software-properties-gtk all 0.99.22.8 [71.3 kB]
    Get:3 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-software-properties all 0.99.22.8 [28.8 kB]
    Fetched 114 kB in 0s (1,650 kB/s)                      
    (Reading database ... 245669 files and directories currently installed.)
    Preparing to unpack .../software-properties-common_0.99.22.8_all.deb ...
    Unpacking software-properties-common (0.99.22.8) over (0.99.22.7) ...
    Preparing to unpack .../software-properties-gtk_0.99.22.8_all.deb ...
    Unpacking software-properties-gtk (0.99.22.8) over (0.99.22.7) ...
    Preparing to unpack .../python3-software-properties_0.99.22.8_all.deb ...
    Unpacking python3-software-properties (0.99.22.8) over (0.99.22.7) ...
    Setting up python3-software-properties (0.99.22.8) ...
    Setting up software-properties-common (0.99.22.8) ...
    Setting up software-properties-gtk (0.99.22.8) ...
    Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
    Processing triggers for shared-mime-info (2.1-2) ...
    Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
    Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
    Processing triggers for hicolor-icon-theme (0.17-2) ...
    Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
    Processing triggers for libglib2.0-0:amd64 (2.72.4-0ubuntu2.2) ...
    Processing triggers for man-db (2.10.2-1) ...
    Adding component(s) 'universe' to all repositories.
    Press [ENTER] to continue or Ctrl-c to cancel.
    Hit:1 http://gb.archive.ubuntu.com/ubuntu jammy InRelease
    Get:2 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]     
    Hit:3 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease            
    Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]      
    Ign:5 http://packages.ros.org/ros/ubuntu jammy InRelease                       
    Hit:6 http://packages.osrfoundation.org/gazebo/ubuntu-stable jammy InRelease   
    Err:7 http://packages.ros.org/ros/ubuntu jammy Release                         
      404  Not Found [IP: 64.50.233.100 80]
    Get:8 http://packages.ros.org/ros2/ubuntu jammy InRelease [4,682 B]
    Err:8 http://packages.ros.org/ros2/ubuntu jammy InRelease
      The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
    Reading package lists... Done
    E: The repository 'http://packages.ros.org/ros/ubuntu jammy Release' does not have a Release file.
    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.
    W: http://packages.osrfoundation.org/gazebo/ubuntu-stable/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ros.org/ros2/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target DEP-11-icons-hidpi (main/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
    W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1

I've tried doing a sudo apt update but that didn't solve the issue. Someone was having a similar issue here: The repository does not have a Release file but I couldn't find the line and file that was referred to in the solution.

Please let me know if you need more information

$\endgroup$
3
  • $\begingroup$ For the sake of people attempting to answer this question, or people who may also be encountering it, please make sure to share the actual text of the error and not a screenshot. Please also try searching for the error that you are seeing: '404 not found when sudo apt update' should provide many results. $\endgroup$
    – cst0
    Nov 20 at 22:03
  • $\begingroup$ Screenshots of console output are not text-searchable, please paste the actual text output and code format it. $\endgroup$ Nov 20 at 22:23
  • $\begingroup$ In addition to editing your question to put the error into text so that it's easily readable and searchable (important for detecting typos), please also edit your question to include context as to what you have done to setup your environment. (Everything from OS and image, to your apt configuratoin etc) There's likely a problem with your configuration which is now shown in the snippet you screenshotted. Please edit and this can be reopened when you provide more informatoin. $\endgroup$
    – Tully
    Nov 21 at 16:37

2 Answers 2

2
$\begingroup$

The "does not have a release file" error is because there is no ros1 binary release for Ubuntu 22. You should remove these ros1 repository lines from your apt config.

$\endgroup$
3
  • $\begingroup$ After reading your updates you look to have successfully followed the ROS 2 instructions. However this is the right answer as it looks like you have attempted to install ROS 1 in the past and there are remnants of that installation which are causing your errors. If you need more help please edit your question to show your apt configuration files. $\endgroup$
    – Tully
    Nov 24 at 18:03
  • $\begingroup$ I have tried removing any ros1 repositories using the command: ''' sudo apt-get purge ros-*. ''' but at the end of the command it had the following: ''' The following packages were automatically installed and are no longer required: linux-image-6.2.0-26-generic linux-modules-6.2.0-26-generic linux-modules-extra-6.2.0-26-generic Use 'sudo apt autoremove' to remove them. 0 to upgrade, 0 to newly install, 0 to remove and 8 not to upgrade. ''' $\endgroup$
    – Error100
    Nov 25 at 12:04
  • $\begingroup$ I have gone to the ''' /etc/apt/apt.conf.d directory '''. I don't know what I should be looking for. $\endgroup$
    – Error100
    Nov 25 at 12:14
1
$\begingroup$

Did you add the apt key?

sudo apt update && sudo apt install curl gnupg2 lsb-release
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

Reference: https://docs.ros.org/en/crystal/Installation/Linux-Install-Binary.html#add-the-ros-2-apt-repository

$\endgroup$
3
  • $\begingroup$ HI Zheng, I have tried adding the apt key based on the instructions here: docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html $\endgroup$
    – Error100
    Nov 20 at 23:13
  • $\begingroup$ Also trying to run the command: sudo apt update && sudo apt install curl -y returns the errors that I pointed out in the image above. $\endgroup$
    – Error100
    Nov 20 at 23:14
  • $\begingroup$ This looks like a second error that I didn't see in my first pass. You likely have both errors. The curl command doesn't appear in the summary above. Please rerun and edit your question to add the results. $\endgroup$
    – Tully
    Nov 28 at 16:55

Your Answer

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

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