我在尝试为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
你们有没有想过为什么我会这样做?
答案 0 :(得分: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)在做坏事之前,它决定停止。