我今天尝试在笔记本电脑上安装 Steam,但毫无意外,它坏了,需要进行调整,就像每次我在 Linux 上安装 Steam 一样。
在我尝试修复缺失的依赖项的过程中,我发现我彻底破坏了我的 apt-get 功能。
事情是这样的。
sudo apt-get install cowsay
它会弹出一条可爱但完全无用的消息:
Reading package lists... Done
Building dependency tree
Reading state information... Done
cowsay is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libllvm3.6:i386 : Depends: zlib1g:i386 (>= 1:1.2.0) but it is not going to
be installed
libpciaccess0:i386 : Depends: zlib1g:i386 (>= 1:1.2.3.3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
So I do the next logical step, the console is telling me to run:
sudo apt-get -f install
好吧,那就试试吧。不,我只是给你一种我正在工作的错觉,让你生气:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
zlib1g:i386
The following NEW packages will be installed:
zlib1g:i386
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
6 not fully installed or removed.
Need to get 0 B/52.9 kB of archives.
After this operation, 182 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 386548 files and directories currently installed.)
Preparing to unpack .../zlib1g_1%3a1.2.8.dfsg-2ubuntu1_i386.deb ...
Unpacking zlib1g:i386 (1:1.2.8.dfsg-2ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/zlib1g_1%3a1.2.8.dfsg-2ubuntu1_i386.deb (--unpack):
trying to overwrite shared '/usr/share/doc/zlib1g/changelog.Debian.gz', which is different from other instances of package zlib1g:i386
Errors were encountered while processing:
/var/cache/apt/archives/zlib1g_1%3a1.2.8.dfsg-2ubuntu1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
到目前为止,我觉得我已经尝试了所有方法。我按照一份相当冗长的指南尝试重新配置我的 dpkg、使用 apt-get clean 等等。重新启动对我没有任何作用。
我完全不知所措了。我只想重新安装 Linux,但我不想因为 Steam 破坏了我的 apt-get 而备份我所有的工作。
答案1
我刚刚修复了它。我所需要做的事情在这篇文章中概述了: 由于 libjackd 导致依赖关系中断
于是我去了/usr/share/doc
,然后把zlib1g
和zlib1g-dev
都改名为.old
背面的。这让我能够
apt-get -f install
现在一切看上去都很幸福。