There is a problem installing on ubuntu

First install some necessary tools:

sudo apt-get update** **sudo apt-get install lsb-release wget gnupg

Then install Gazebo Garden:

sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg** **echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null** **sudo apt-get update** **sudo apt-get install gz-garden

When I type this command “sudo apt-get update”, it told me that the following signature could not be verified because there was no public key: NO_PUBKEY 67170598AF249743

The question lingered all night,help me,please!!!

1 Like

help!!! Somebody help me!

I have the same problem. Any solution?

Hi everyone! My friends call me Alex.

Today I tried to install gazebo latest lts on ubuntu 22.04 LTS (jammy)
First using sudo snap install gazebo --beta did not work for me
Then I tried sudo snap install gazebo --edge did not work for me

Then I decided to try install binaries following the instructions in the official gazebo documentation.

Then I stumbled on the same error then some of you. Here is 11 steps of how I fixed it.

  1. Configure the latest keyserver in Ubuntu 22.04 LTS Keychain app in Ubuntu Desktop with GNOME
    For me I removed all old keyservers. I added only
    hkps://keyserver.ubuntu.com:443
  2. Using Keychain app search for the fingerprint shown by NO_PUB_KEY message
  3. Import the key to your local keystore
    4.Logout/Login again
  4. Create a symlink ln -s /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg /etc/apt/trusted.gpg.d/pkgs-osrf-archive-keyring.gpg
  5. KEY POINT FOR ME: Change the ownership of both /etc/apt/trusted.gpg.d and /etc/apt/trusted.gpg.d/pkgs-osrf-archive-keyring.gpg
    With the command:
    chown _apt:nogroup /etc/apt/trusted.gpg.d

chown _apt:nogroup /etc/apt/trusted.gpg.d/pkgs-osrf-archive-keyring.gpg

  1. Change permission of the gpg file with this command
    chmod 0644 /etc/apt/trusted.gpg.d/pkgs-osrf-archive-keyring.gpg

  2. Change slightly the install command provided in the official documentation of gazebo for ubuntu 22.04 LTS binaries

#!/bin/bash

set -eu

sudo apt-get update &&
sudo apt-get full-upgrade &&
sudo apt-get install -y lsb-release wget gnupg &&
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg &&
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/pkgs-osrf-archive-keyring.gpg] https://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null &&

sudo apt-get update &&
sudo apt-get install gz-harmonic

  1. Put the previous bash script in a file for example install-gazebo-latest-lts.sh

  2. Give executable persmission to that file
    chmod 0700 install-gazebo-latest-lts.sh

  3. Run the script ./install-gaebo-latest-lts.sh and enjoy