更新错误(使用 apt-get install -f)?

更新错误(使用 apt-get install -f)?

于是我尝试更新我的系统,结果发现这个弹出错误,

The package system is broken

Check if you are using third party repositories. If so disable them,
since they are a common source of problems. Furthermore run the
following command in a Terminal: apt-get install -f

我在命令下运行须藤在命令提示符中,找到此问题,

Reading package lists... Done Building dependency tree        Reading
state information... Done Correcting dependencies... Done The
following packages were automatically installed and are no longer
required:   nvidia-settings-updates libudev0:i386 Use 'apt-get
autoremove' to remove them. The following extra packages will be
installed:   tor Suggested packages:   mixmaster xul-ext-torbutton
socat tor-arm apparmor-utils The following NEW packages will be
installed:   tor 0 upgraded, 1 newly installed, 0 to remove and 243
not upgraded. 1 not fully installed or removed. Need to get 0 B/1,097
kB of archives. After this operation, 2,571 kB of additional disk
space will be used. Do you want to continue [Y/n]? y (Reading database
... 388724 files and directories currently installed.) Unpacking tor
(from .../tor_0.2.4.21-1~precise+1_amd64.deb) ... dpkg: error
processing /var/cache/apt/archives/tor_0.2.4.21-1~precise+1_amd64.deb
(--unpack):  trying to overwrite '/usr/bin/tor', which is also in
package tor-browser 2.3.25-12 dpkg-deb: error: subprocess paste was
killed by signal (Broken pipe) Processing triggers for man-db ...
Errors were encountered while processing: 
/var/cache/apt/archives/tor_0.2.4.21-1~precise+1_amd64.deb E:
Sub-process /usr/bin/dpkg returned an error code (1)

我该怎么做才能修复此错误并开始更新?

答案1

  1. 收到该错误后,请尝试 sudo apt-get -f install 强制安装

安装由于错误而未加载的文件。

然后再次尝试 sudo apt-get update,sudo apt-get -f install 来回尝试直到只剩下出现错误的包。

sudo dpkg --configure -a

and clean the cache

sudo apt-get clean

答案2

删除tor-browser包并修复依赖关系。

sudo dpkg -P tor-browser
sudo apt-get install -f

相关内容