为什么 Wine 不能安装在我的系统上?

Raw*_*awX 15 package-management wine 12.10

我在全新安装时升级到 Ubuntu 12.10,并且我已经多次尝试安装 wine,但我总是得到这个:

This error could be caused by required additional software packages which are missing or not installable. 
Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time.
The following packages have unmet dependencies:

wine:
Run Code Online (Sandbox Code Playgroud)

它不会让我安装依赖项,或者说它需要另一组依赖项来安装它们。使用华硕KJ50 64位操作系统,Windows 7双启动

sudo apt-get install wine1.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 wine1.5 : Depends: wine1.5-i386 (= 1.5.15-0ubuntu1) but it is not installable
           Recommends: gnome-exe-thumbnailer but it is not going to be installed or
                       kde-runtime but it is not going to be installed
           Recommends: ttf-droid
           Recommends: ttf-mscorefonts-installer but it is not going to be installed
           Recommends: ttf-umefont but it is not going to be installed
           Recommends: ttf-unfonts-core but it is not going to be installed
           Recommends: winbind but it is not going to be installed
           Recommends: winetricks but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

cle*_*ary 12

我一直有同样的问题,事实证明,在较新版本的 apt 和 dpkg 中,它们支持称为“多架构”的功能。简单来说,您可以指定 apt 从本机安装以外的体系结构的存储库中提取软件包信息,并从这些存储库安装多架构兼容的软件包。有关更多详细信息,请参阅:http : //wiki.debian.org/Multiarch/HOWTO

您的具体问题是 wine1.5-i386 位于 32 位 wine 存储库中,但不在 64 位存储库中,并且由于某种原因,您的 dpkg/apt 未配置为处理此问题。解决:

使用以下方法检查您的原生架构:

sudo dpkg --print-architecture #in your case this should return 'amd64'
Run Code Online (Sandbox Code Playgroud)

其他可用的架构可以通过以下方式显示:

sudo dpkg --print-foreign-architectures #in your case this should not return anything
Run Code Online (Sandbox Code Playgroud)

所以你需要配置一个新的国外架构(quantal/12.10 or newer***):

sudo dpkg --add-architecture i386
Run Code Online (Sandbox Code Playgroud)

检查您的新 arch 现在是否可用,使用 apt 更新和安装您的软件包:

sudo dpkg --print-foreign-architectures #now this should return 'i386'
sudo apt-get update; sudo apt-get install wine1.5 #and away you go!
Run Code Online (Sandbox Code Playgroud)

========

***请注意 Ubuntu dpkg in natty (1.16.0~ubuntu7 (reports 1.15.8.10)), oneiric and precision (1.16.1.2ubuntu7) 使用不同的语法:*

echo "foreign-architecture i386" > /etc/dpkg.cfg.d/architectures
Run Code Online (Sandbox Code Playgroud)


Suh*_*aib 2

安装 wine 时您是否遵循以下步骤:

\n\n

打开终端并输入以下命令:\n但首先通过以下命令删除 wine:sudo apt-get remove --purge wine*

\n\n
sudo add-apt-repository ppa:ubuntu-wine\n
Run Code Online (Sandbox Code Playgroud)\n\n

添加您已经添加的 wine 存储库后。使用软件管理器转到 \xe2\x80\x98edit\xe2\x80\x99 并选择 \xe2\x80\x98softwaresources\xe2\x80\x99。选择 \xe2\x80\x98other software\xe2\x80\x99 选项卡,然后单击窗口底部的 \xe2\x80\x98add\xe2\x80\x99。您现在需要添加以下代码行,而不是原始 Wine PPA 链接。

\n\n
deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main\n
Run Code Online (Sandbox Code Playgroud)\n\n

您现在可以关闭源列表和软件管理器。接下来要更新源列表,请打开终端并输入:

\n\n
sudo apt-get update\n
Run Code Online (Sandbox Code Playgroud)\n\n

更新源列表后,您可以使用以下命令安装稳定的 1.4 Wine 包或 1.5 开发包:

\n\n

葡萄酒 1.4(稳定)

\n\n
sudo apt-get install wine1.4\n
Run Code Online (Sandbox Code Playgroud)\n\n

Wine 1.5(开发)

\n\n
sudo apt-get install wine1.5\n
Run Code Online (Sandbox Code Playgroud)\n\n

\xe2\x80\x99s 就是其中的全部内容,您现在还将继续在 Linux 上获取最新的 Wine 版本和更新,尽情享受!

\n\n

解决方案的来源

\n\n
\n\n

另一个解决方案:添加 PPA 后如何解决未满足的依赖关系?

\n

  • sudo apt-get remove --purge wine* 我用过这个,它删除了我曾经安装过的所有东西 -_- (2认同)
  • 正如 @RawX 所说,“sudo apt-get remove --purge wine*”可能会删除比您预期更多的内容;`apt-get` 不像 shell 那样使用通配符。如果您的目的只是删除名称以“wine”开头的所有包,请使用正则表达式:“sudo apt-get purge ^wine”一般来说,对于使用通配符或正则表达式的包删除命令,建议首先在某些机器上模拟它,将“sudo apt-get”替换为“apt-get -s”。这向您展示了它会做什么,而无需实际执行。(当然,这并不总是可以预测另一个系统上的结果。) (2认同)

小智 1

尝试在 64 位安装上安装 i386 软件包时出现此错误。尝试按照适用于您的系统的指南进行操作!

http://wiki.winehq.org/WineOn64bit#head-77def7ca75193f24e358dba3dd6bcf674bd61b37

我知道这一点,因为这就是我最初所做的。

  • 虽然这从理论上可以回答这个问题,但[最好](​​http://meta.stackexchange.com/q/8259)在此处包含答案的基本部分,并提供参考链接。 (3认同)