问题描述
当我尝试通过aptitude按照scala-sbt主页的说明在Ubuntu上安装sbt时,我收到了几个错误:
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-get update
sudo apt-get install sbt
http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html
首先,我得到包验证错误,然后是分段错误。
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sbt
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 1,041 kB of archives.
After this operation, 1,224 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
sbt
Install these packages without verification? [y/N] y
E: Method https has died unexpectedly!
E: Sub-process https received a segmentation fault.
编辑:
我可以在没有任何证书错误的情况下浏览镜像。
确认它与apt-cache使用的镜像。
$ sudo apt-cache policy sbt
sbt:
Installed: (none)
Candidate: 0.13.7
Version table:
0.13.7 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.6 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.5 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.2 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.1-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.0-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.12.4-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
编辑2:我最终只是手动下载包并用dpkg安装它。
最佳解决思路
有相关的答案引导我找到这个解决方案:
wget https://dl.bintray.com/sbt/debian/sbt-0.13.7.deb
sudo dpkg -i sbt-0.13.7.deb
附:我认为正式记录的方式不起作用,因为它们没有提供apt对身份验证包使用的公钥。
P.P.S.经过一些研究后我发现这个问题与apt包有关,在bugs.launchpad.net上有很多关于这个错误的报道。所以,虽然它仍然是sbt没有提供公钥的问题,但它不应该导致这个错误。我希望规范能尽快解决这个问题。
有关: