我尝试使用更新管理器进行更新,但无法更新,因为中途遇到错误 (error: brokencount>0
)。我试过了apt-get -f install
,但没用。
你可以检查我的终端:
trungtin@trungtin-S551LN:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
debugedit libllvm5.0 librpmbuild3 librpmsign3 rpm swarm
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
ethereum-swarm
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 0 B/5.560 kB of archives.
After this operation, 22,2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package ethereum-swarm.
(Reading database ... 316020 files and directories currently installed.)
Preparing to unpack .../ethereum-swarm_0.3.1+build14601+xenial_amd64.deb ...
Unpacking ethereum-swarm (0.3.1+build14601+xenial) ...
dpkg: error processing archive /var/cache/apt/archives/ethereum-swarm_0.3.1+build14601+xenial_amd64.deb (--unpack):
trying to overwrite '/usr/bin/swarm', which is also in package swarm 2.1.6-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/ethereum-swarm_0.3.1+build14601+xenial_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试清理缓存然后重新安装或覆盖 ethreum-swarm。
答案1
我使用 删除了 ethereum ppa,sudo add-apt-repository --remove ppa:ethereum/ethereum
然后必须sudo apt-get -f install
按照错误消息提示运行,然后其他 apt 命令才能完成。然后我可以sudo apt-get purge swarm
成功运行,然后我就可以运行了sudo apt upgrade
。不过,我无法评论哪些是必要的或充分的。
答案2
这里有三个选项:
询问软件包作者关于他们
ethereum-swarm
和ubuntu 软件包swarm
。删除标准
swarm
Ubuntu 包然后安装ethereum-swarm
:sudo apt-get purge swarm sudo apt-get install ethereum-swarm
强制安装
ethereum-swarm
(您需要承担此风险,因为不建议这样做):sudo dpkg -i --force-all \ /var/cache/apt/archives/ethereum-swarm_0.3.1+build14601+xenial_amd64.deb
然后删除
swarm
包sudo apt-get purge swarm
并重新安装sudo apt-get install --reinstall ethereum-swarm
(以保持系统清洁)。