无法安装 Wine(包含损坏的软件包)

无法安装 Wine(包含损坏的软件包)

我正在尝试在 Ubuntu 系统上安装 Wine,但无法完成安装。我读过无数其他问答,但似乎都没有解决我的问题。当我尝试使用

sudo apt-get install wine

我收到此消息:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
wine : Depends: wine1.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试使用 Synaptic:(wine 包中有一个感叹号而不是勾号)

Could not apply changes!  
Fix broken packages first.

我单击修复软件包,然后出现此错误:

E: Unable to correct problems, you have held broken packages.
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

我也尝试过类似的命令

sudo apt-get remove wine
sudo aptitude search wine
sudo dpkg -p Wine

但它们都不起作用。我现在很困惑,我可能错过了一些简单的东西。我是 Ubuntu 的新用户,所以我不知道高级方法和终端命令。我做错了什么吗?我只尝试了本论坛中发布的解决方案和命令。提前感谢你的帮助!

编辑:在我跑完之后

uname -a; lsb_release -a; apt-cache policy wine wine1.6; sudo apt-get remove wine; sudo apt-get install -f 我得到:

Linux tommy-Lenovo-Z50-75 3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

apt-cache policy wine wine1.6

wine:
  Installed: (none)
  Candidate: 1:1.7.50-0ubuntu1
  Version table:
     1:1.7.50-0ubuntu1 0
        500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ trusty/main amd64 Packages
     1:1.6.2-0ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
wine1.6:
  Installed: (none)
  Candidate: 1:1.6.2-0ubuntu4
  Version table:
     1:1.6.2-0ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

sudo apt-get remove wine

Building dependency tree
Reading state information... Done
Package 'wine' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Reading package lists... Done

sudo apt-get install -f

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

编辑:我试过了

$ sudo apt-get remove --purge wine
$ sudo apt-get install wine

即使运行后sudo apt-get update,问题仍然存在。

编辑(最后也是最终):在尝试确定损坏的软件包失败后,我将把我的笔记本电脑格式化为 Ubuntu Gnome(最新版本)。我当前运行的版本是 14.04 LTS 和 Unity。感谢您的帮助,这个帖子应该关闭了。我的系统似乎缺少一些软件包,所以因为它是新安装的(2 周前),所以我会再次格式化它。再次感谢所有的回复!

答案1

在终端中输入以下内容:

$ sudo apt-get remove --purge wine
$ sudo apt-get install wine

这应该会删除所有保留的软件包,并正确安装 Wine。另外请确保您没有从源代码安装 Wine。

答案2

  1. 您目前没有任何问题...证明:

    $ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    
  2. PPA 也没有问题。有一个wine适用于 Trusty 的软件包,还有这个应该安装包wine1.7用这个检查一下关联。我已经在我的计算机上测试过了,它有效。该软件包wine强制安装wine1.7。恐怕您只是忘了运行命令sudo apt-get update。显然您在此期间执行了此操作(根据您更新的问题)。

  3. 该软件包wine“仅”是一个元软件包。您也可以wine使用命令安装

    sudo apt-get install wine1.7
    

答案3

这也将修复必要的链接。

> sudo apt-get install wine --fix-missing

相关内容