无法在线安装sbt(遵循官方指南)

时间:2018-08-01 01:53:12

标签: scala ubuntu sbt

在Ubuntu16.04上的

,从此官方页面上: 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

我得到了:

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

由于我在大陆,所以尝试过直接连接到Internet或“ export all_proxy = sock5h:// ip:port”:-)

1 个答案:

答案 0 :(得分: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

您无法连接到keyserver.ubuntu.com来验证公钥,因此我认为这与sbt或其分配无关。 我建议您手动下载deb文件,或者找出其他可用的密钥服务器。