尝试安装 wine 后 apt-get 崩溃了

尝试安装 wine 后 apt-get 崩溃了

我是 Linux 新用户。我使用 Kali Linux,并尝试通过以下方式安装 wine:

sudo apt-get install wine winetricks

但是,由于出现了一些错误,这个方法没有奏效。之后,我无法安装、更新或执行任何与 apt-get 相关的事情。运行 apt-get 时出现以下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 wine : Depends: wine1.6 but it is not installed
E: Unmet dependencies. Try using -f.

运行 apt-get install -f 会尝试安装 wine 1.6,但会失败。以下是此命令的初始输出:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libp11-kit-gnome-keyring wine1.6 wine1.6-i386
Suggested packages:
  dosbox:any winbind
Recommended packages:
  fonts-droid wine-gecko2.21 wine-mono0.0.8
The following NEW packages will be installed:
  libp11-kit-gnome-keyring wine1.6 wine1.6-i386
0 upgraded, 3 newly installed, 0 to remove and 283 not upgraded.
20 not fully installed or removed.
Need to get 0 B/16.6 MB of archives.
After this operation, 120 MB of additional disk space will be used.
Do you want to continue? [Y/n]

我无法安装任何其他东西,因为这个 wine 依赖性错误妨碍了我。运行 apt-get clean 对此没有任何作用。我该如何解决这个问题?要么彻底删除 wine,要么妥善安装 wine,只要能正常工作并且不会破坏系统,对我来说就没问题。

提前致谢。

答案1

经过几个小时的努力,我解决了这个问题。我必须通过 dpkg -r 删除依赖项

整套行动如下:

sudo dpkg -r libwine:i386
sudo dpkg -r wine1.6-i386
sudo dpkg -r kali-linux-full
sudo dpkg -r regripper
sudo dpkg -r sqldict
sudo dpkg -r ollydbg
sudo dpkg -r wine

之后,一切恢复正常。希望这能帮助那些遇到同样问题的人。

答案2

使用能力。

sudo aptitude install wine winetricks 

它有点冗长,我们会不断尝试。

相关内容