1

我在尝试为 Scala 版本 2.10.2 安装 .deb 文件时遇到问题。

我收到以下错误:

(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 372442 files and directories currently installed.)
Preparing to replace scala 2.9.1.dfsg-3 (using .../Downloads/scala-2.10.2.deb) ...
Unpacking replacement scala ...
dpkg: error processing /home/chris/Downloads/scala-2.10.2.deb (--install):
 trying to overwrite '/usr/share/java/scala-library.jar', which is also in package scala-library 2.9.1.dfsg-3
dpkg-deb (subprocess): data: internal gzip write error: Broken pipe
dpkg-deb (subprocess): failed in write on buffer copy for failed to write to pipe in copy: Broken pipe
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Processing triggers for man-db ...
Errors were encountered while processing:
 /home/chris/Downloads/scala-2.10.2.deb

你们知道我为什么会得到这个吗?

4

1 回答 1

6

/usr/share/java/scala-library.jar在包装中scala-library。您必须删除两者,然后安装 2.10.2 包:

apt-get remove scala-library scala
dpkg -i  /home/chris/Downloads/scala-2.10.2.deb

更详细地说,剽窃你的输出日志:

1)dpkg正在安装新版本的scala软件包:

Unpacking replacement scala ...

2)在检查一切是否顺利时,它意识到如果解scala包,它将替换另一个名为的包中的文件scala-library

trying to overwrite '/usr/share/java/scala-library.jar', which is also in package scala-library 2.9.1.dfsg-3

3)它决定在做坏事之前停止。

于 2013-09-13T17:12:38.030 回答