scala - SBT 在 Ubuntu 14.04 上使用 aptitude 安装失败

标签 scala ubuntu sbt typesafe

当我尝试按照 scala-sbt 主页上的说明通过 aptitude 在 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 用于验证包的公钥。

附言经过一些研究,我发现这个问题与 apt 包更相关,在 bugs.launchpad.net 上有很多关于这个错误的报告。所以,虽然 sbt 没有提供公钥仍然是一个问题,但它不应该导致这个错误。我希望 Canonical 能尽快解决这个问题。

相关:

关于scala - SBT 在 Ubuntu 14.04 上使用 aptitude 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28543911/

相关文章:

java - 文件行中的 bin 编号可以优雅地分组

scala - 选择最具体的子类型的隐式解析

linux - 为什么Ubuntu的 `ls`命令可以列出没有设置执行权限的目录下的文件?

python - 如何修复 : collect2: error: ld returned 1 exit status error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

python-3.x - 如何让 Pip 在 Ubuntu 12.04 上使用 Python3

sbt - 如何在单任务的多模块构建中将一些模块 "package"转换为 jar 并将其他模块转换为 war ?

jar - sbt:如何将本地文件系统 jar 添加到我的项目中?

scala - 在 sbteclipse 插件中使用 classpathTransformerFactories 来排除 Scala 库?

scala - Play Scala Json Missing Property vs Null

scala - 如何在 sbt shell 中设置子项目的设置(不使用项目命令)?