Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing sbt on Ubuntu 18.04: `gpg: keyserver receive failed: Invalid argument` [closed]

I'm following the official sbt install instructions.

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
Executing: /tmp/apt-key-gpghome.uRI0yiusG0/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
gpg: keyserver receive failed: Invalid argument

Edit:

I've tried digging into the gpg.1.sh script that it executes. Here is the final call to gpg.

$ sudo cat /tmp/apt-key-gpghome.IRnmlx6hfX/gpg.0.sh
#!/bin/sh
exec 'gpg' --ignore-time-conflict --no-options --no-default-keyring \
--homedir '/tmp/apt-key-gpghome.IRnmlx6hfX' --no-auto-check-trustdb --trust-model always "$@"

Edit 2:

I've tried to directly query for the key from the keyserver with no luck. See http://keyserver.ubuntu.com/pks/lookup?search=2EE0EA64E40A89B84B2DF73499E82A75642AC823&op=vindex . Is it possible the key is missing?

Edit 3:

I retried again on Feb 24th and it now works!

like image 997
Kent Shikama Avatar asked Dec 14 '22 15:12

Kent Shikama


1 Answers

giving the command

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823

I got the error

Executing: /tmp/apt-key-gpghome.DKOlZn67Q0/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
gpg: ricezione dal server di chiavi non riuscita: Dati assenti

(no data)

I solved in this way (laptop with Ubuntu 18.04.1, behind a corporate proxy without authentication):

  1. got the key with gpg: gpg --receive-keys 99E82A75642AC823
  2. gpg showed me that the key belongs to [email protected]
  3. searched that key on http://keyserver.ubuntu.com/ using the email address
  4. saved the key in local file (sbt-key) and then imported with sudo apt-key add sbt-key
like image 68
Daniele Gagliardi Avatar answered Dec 21 '22 09:12

Daniele Gagliardi