5

on Ubuntu16.04, from this offical page: https://www.scala-sbt.org/download.html

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt

what I got:

fino@envy:bin$ echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
[sudo] password for fino: 
deb https://dl.bintray.com/sbt/debian /

fino@envy:bin$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
Executing: /tmp/tmp.YqbI7qVhAP/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv
2EE0EA64E40A89B84B2DF73499E82A75642AC823
gpg: requesting key 642AC823 from hkp server keyserver.ubuntu.com

?: keyserver.ubuntu.com: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: Connection timed out
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver unreachable
gpg: keyserver communications error: public key not found
gpg: keyserver receive failed: public key not found

I tried both direct connect to internet or "export all_proxy=sock5h://ip:port" since I am in mainland:-)

  • 1
    Can't say anything about `deb` installation, but simply downloading the `.zip`, unpacking it, and adding `/sbt/bin` subdirectory to `PATH` never failed me. – Andrey Tyukin Aug 01 '18 at 06:49
  • 2
    thank. I can do it this way. but still want to find a answer why official website's guide not working for me; or not working for others also. – fino xiangfu meng Aug 01 '18 at 06:54
  • Are you behind a corporate proxy ? You can add this to the command line `-keyserver-options http-proxy=` – Awsom3D Aug 23 '18 at 06:15
  • I'm facing the same issue and I'm pretty sure I am not behind any firewall. – Kent Shikama Aug 23 '18 at 06:16
  • Whoops, actually I have a similar looking but different issue. – Kent Shikama Aug 23 '18 at 09:56
  • See https://stackoverflow.com/questions/51983144/error-installing-sbt-on-ubuntu-18-04-gpg-keyserver-receive-failed-invalid-ar . They might be related but probably not. – Kent Shikama Aug 23 '18 at 10:00

1 Answers1

0
gpg: requesting key 642AC823 from hkp server keyserver.ubuntu.com

?: keyserver.ubuntu.com: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: Connection timed out
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver unreachable
gpg: keyserver communications error: public key not found
gpg: keyserver receive failed: public key not found

You're failing to connect to keyserver.ubuntu.com to verify the public key, so I don't think this is an issue with sbt or its distribution. I'd suggest you download the deb file manually, or find out some other key server available to you.

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319