apt-get 坏了无法安装任何东西

apt-get 坏了无法安装任何东西

当我收到此错误时,我正在尝试安装外星人..

root@Linux:~# apt-get install alien
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 alien : Depends: rpm (>= 2.4.4-2) but it is not going to be installed
         Depends: rpm2cpio
 texlive-extra-utils : Depends: texlive-plain-generic (>= 2020.20200417) but it is not going to be installed
                       Recommends: liblog-log4perl-perl but it is not going to be installed
 texlive-pstricks : Depends: texlive-plain-generic (>= 2020.20200417) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

当我尝试建议“apt --fix-broken install”时,我得到

Do you want to continue? [Y/n] y
(Reading database ... 390141 files and directories currently installed.)
Preparing to unpack .../texlive-plain-generic_2020.20200417-1_all.deb ...
Unpacking texlive-plain-generic (2020.20200417-1) ...
dpkg: error processing archive /var/cache/apt/archives/texlive-plain-generic_2020.20200417-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/fonts/fontname/8a.html', which is also in package texlive-generic-recommended 2014.20141024-2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/texlive-plain-generic_2020.20200417-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试删除 texlive-generic-recommended ,它再次给了我上面的第一个错误,我不是 Linux 专家,我只是勉强过得去,我无法解决这个问题,有什么想法吗?

cat /etc/apt/sources.list
deb https://http.kali.org/kali kali-rolling main non-free contrib
#deb-src https://http.kali.org/kali kali-rolling main non-free contrib
ls -la /etc/apt/sources.list.d
total 12
drwxr-xr-x 2 root root 4096 Sep 24  2019 .
drwxr-xr-x 7 root root 4096 Apr 13 21:46 ..
-rw-r--r-- 1 root root  189 Sep 24  2019 google-chrome.list

答案1

dpkg与选项一起使用--force-overwrite 可强制安装最新的.deb软件包。

dpkg -i --force-overwrite  /var/cache/apt/archives/texlive-plain-generic_2020.20200417-1_all.deb
apt --fix-broken install
apt update

请参阅 Debain wiki:如何解决管道破裂编辑文件时出错status

相关内容