Search code examples
rosubuntu-18.04

ROS melodic adding key error installation in Ubuntu 18.04


I tried to install ROS melodic in Ubuntu 18.04. I am able to add the source file. But when I tried to add the key for it, it gave this error. The command I used is:

$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

The error it threw is:

Executing: /tmp/apt-key-gpghome.cUIgKzTGF5/gpg.1.sh --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
gpg: keyserver receive failed: Server indicated a failure

When I pinged,

$ ping ha.pool.sks-keyservers.net
PING ha.pool.sks-keyservers.net (192.146.137.99) 56(84) bytes of data.
64 bytes from pgpkeys.co.uk (192.146.137.99): icmp_seq=1 ttl=49 time=169 ms
64 bytes from pgpkeys.co.uk (192.146.137.99): icmp_seq=2 ttl=49 time=169 ms

it was working fine. How to solve this problem?


Solution

  • It worked after using this:

    $ wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -