scala - 无法在线安装 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
我尝试直接连接到互联网或“export all_proxy=sock5h://ip:port”,因为我在大陆:-)
解决方案
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 文件,或者找出一些其他可用的密钥服务器。
推荐阅读
- angular - 使用带有 Angular 的 MapBox GL JS - 错误:无效类型:“容器”必须是字符串或 HTMLElement
- flutter - 在颤动中从 webview 导航到 InApp 屏幕
- html - 如何将文本或图像与 HTML 或 CSS 中的数值对齐?
- pdf - 链接以从 Markdown 文档加载本地 PDF 的特定页面
- vsto - 无法从 Visual Studio 2019 运行 Excel 加载项
- loops - 循环并比较两个foreach循环的所有结果?
- python - 如何使用 argparse 只允许正整数
- java - 如何提高 JSON 解析的性能
- javascript - For ... in 不让步的方法
- ios - 如何在带有 XCode 12.2 的 Swift 中使用 Objective-C 扩展函数?