尝试 user1261084 解决方案:
$ sudo apt-get install wine
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:
wine : Depends: wine1.4 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
再次尝试@eric-carvalho 解决方案
$ apt-cache policy libgnutls26
libgnutls26:
Installed: 2.12.19-1
Candidate: 2.12.19-1
Version table:
*** 2.12.19-1 0
100 /var/lib/dpkg/status
2.12.14-5ubuntu3.1 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
2.12.14-5ubuntu3 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
我删除了ppa:ubuntu-wine/ppa
存储库(软件中心>编辑>软件源>其他软件并手动删除),然后转到 Ubuntu 软件选项卡并按照 user1261084 的建议进行Download from
更改Main Server
。
之后我尝试降级libgnutls26
到版本2.12.14-5ubuntu3.1
:
$ sudo apt-get install libgnutls26=2.12.14-5ubuntu3.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
gnutls-bin
The following packages will be DOWNGRADED:
libgnutls26
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 8 not upgraded.
Need to get 459 kB of archives.
After this operation, 326 kB disk space will be freed.
Do you want to continue [Y/n]? Y
Get:1 http://archive.ubuntu.com/ubuntu/ precise-updates/main libgnutls26 amd64 2.12.14-5ubuntu3.1 [459 kB]
Fetched 459 kB in 5s (86.8 kB/s)
dpkg: warning: downgrading libgnutls26 from 2.12.19-1 to 2.12.14-5ubuntu3.1.
(Reading database ... 267654 files and directories currently installed.)
Preparing to replace libgnutls26 2.12.19-1 (using .../libgnutls26_2.12.14-5ubuntu3.1_amd64.deb) ...
Unpacking replacement libgnutls26 ...
Setting up libgnutls26 (2.12.14-5ubuntu3.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
它的工作方式如下:
$ sudo apt-get install wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
autopoint rpm librpmbuild2 librpmsign0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
fonts-droid fonts-horai-umefont libasn1-8-heimdal:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libcapi20-3
libcapi20-3:i386 libcups2:i386 libexif12:i386 libgcrypt11:i386 libgd2-xpm:i386 libgif4:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386
libglapi-mesa:i386 libglu1-mesa:i386 libgnutls26:i386 libgpg-error0:i386 libgphoto2-2:i386 libgphoto2-port0:i386 libgssapi-krb5-2:i386
libgssapi3-heimdal:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386
libheimntlm0-heimdal:i386 libhx509-5-heimdal:i386 libieee1284-3:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-26-heimdal:i386 libkrb5-3:i386
libkrb5support0:i386 libldap-2.4-2:i386 libllvm3.0:i386 libltdl7:i386 libmpg123-0:i386 libopenal1:i386 liborc-0.4-0:i386 libp11-kit0:i386
libroken18-heimdal:i386 libsane:i386 libsasl2-2:i386 libsasl2-modules:i386 libssl1.0.0:i386 libtasn1-3:i386 libusb-0.1-4:i386 libv4l-0:i386
libv4lconvert0:i386 libwind0-heimdal:i386 libx11-xcb1:i386 libxcb-glx0:i386 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxfixes3:i386
libxinerama1:i386 libxml2:i386 libxpm4:i386 libxrandr2:i386 libxslt1.1:i386 libxxf86vm1:i386 ttf-droid ttf-umefont wine-gecko1.4 wine-gecko1.4:i386
wine1.4 wine1.4-amd64 wine1.4-common wine1.4-i386:i386 winetricks
Suggested packages:
cups-common:i386 rng-tools:i386 libgd-tools:i386 libglide3:i386 gnutls-bin:i386 gphoto2:i386 gtkam:i386 krb5-doc:i386 krb5-user:i386
libvisual-0.4-plugins:i386 gstreamer-codec-install:i386 gnome-codec-install:i386 gstreamer0.10-tools:i386 gstreamer0.10-plugins-base:i386 hpoj:i386
hplip:i386 libsane-extras:i386 sane-utils:i386 libsasl2-modules-otp:i386 libsasl2-modules-ldap:i386 libsasl2-modules-sql:i386
libsasl2-modules-gssapi-mit:i386 libsasl2-modules-gssapi-heimdal:i386 dosbox
Recommended packages:
xml-core:i386 gettext:i386
The following packages will be REMOVED:
alien debhelper gettext gnome-common intltool intltool-debian po-debconf
The following NEW packages will be installed:
fonts-droid fonts-horai-umefont libasn1-8-heimdal:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libcapi20-3
libcapi20-3:i386 libcups2:i386 libexif12:i386 libgcrypt11:i386 libgd2-xpm:i386 libgif4:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386
libglapi-mesa:i386 libglu1-mesa:i386 libgnutls26:i386 libgpg-error0:i386 libgphoto2-2:i386 libgphoto2-port0:i386 libgssapi-krb5-2:i386
libgssapi3-heimdal:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386
libheimntlm0-heimdal:i386 libhx509-5-heimdal:i386 libieee1284-3:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-26-heimdal:i386 libkrb5-3:i386
libkrb5support0:i386 libldap-2.4-2:i386 libllvm3.0:i386 libltdl7:i386 libmpg123-0:i386 libopenal1:i386 liborc-0.4-0:i386 libp11-kit0:i386
libroken18-heimdal:i386 libsane:i386 libsasl2-2:i386 libsasl2-modules:i386 libssl1.0.0:i386 libtasn1-3:i386 libusb-0.1-4:i386 libv4l-0:i386
libv4lconvert0:i386 libwind0-heimdal:i386 libx11-xcb1:i386 libxcb-glx0:i386 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxfixes3:i386
libxinerama1:i386 libxml2:i386 libxpm4:i386 libxrandr2:i386 libxslt1.1:i386 libxxf86vm1:i386 ttf-droid ttf-umefont wine wine-gecko1.4
wine-gecko1.4:i386 wine1.4 wine1.4-amd64 wine1.4-common wine1.4-i386:i386 winetricks
0 upgraded, 74 newly installed, 7 to remove and 8 not upgraded.
Need to get 143 MB of archives.
After this operation, 408 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
...
Setting up wine1.4-common (1.4-0ubuntu4.1) ...
Setting up wine1.4-amd64 (1.4-0ubuntu4.1) ...
Setting up wine1.4-i386:i386 (1.4-0ubuntu4.1) ...
Setting up wine1.4 (1.4-0ubuntu4.1) ...
Setting up wine (1.4-0ubuntu4.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
检查 Wine 版本(已安装:1.4-0ubuntu4.1)
$ apt-cache policy wine
wine:
Installed: 1.4-0ubuntu4.1
Candidate: 1.4-0ubuntu4.1
Version table:
*** 1.4-0ubuntu4.1 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/universe amd64 Packages
100 /var/lib/dpkg/status
1.4-0ubuntu4 0
500 http://archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
现在我已经安装了 wine 1.4 我ppa:ubuntu-wine/ppa
再次添加了存储库并:
$ sudo apt-get install wine1.5
(...)
$ apt-cache policy wine
wine:
Installed: 1.5.13-0ubuntu1
Candidate: 1.5.13-0ubuntu1
Version table:
*** 1.5.13-0ubuntu1 0
500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
1.4-0ubuntu4.1 0
500 http://mirror.globo.com/ubuntu/archive/ precise-updates/universe amd64 Packages
1.4-0ubuntu4 0
500 http://mirror.globo.com/ubuntu/archive/ precise/universe amd64 Packages
答案1
看起来多架构未启用。如果您从以前的版本升级 Ubuntu,而不是执行全新安装,则可能会发生这种情况。
在终端中运行以下命令:
echo "foreign-architecture i386" | sudo tee /etc/dpkg/dpkg.cfg.d/multiarch
sudo chmod 644 /etc/dpkg/dpkg.cfg.d/multiarch
然后尝试再次安装 wine:
sudo apt-get update
sudo apt-get install wine1.5
如果你仍然遇到依赖问题,可能是因为这个错误。wine1.5-amd64
建议gettext
,wine1.5-i386:i386
建议gettext:i386
和 两者gettext
相互冲突。我设法wine1.5
通过进行安装aptitude
,如果尚未安装,请安装它(sudo apt-get install aptitude
):
sudo aptitude install wine1.5 gettext:i386-
结尾的减号(-)将指示aptitude
删除(或跳过安装)gettext:i386
。
编辑:
您拥有的libgnutls26
版本是 2.12.19,可能是从 ppa 安装的,因为 ubuntu repos 中提供的最新版本是 2.12.14。wine
依赖于libgnutls26:i386
,其版本必须与 相同libgnutls26
,但 2.12.19 不可用于安装。您可以尝试手动下载并安装版本 2.12.19,或者删除安装了版本 2.12.19libgnutls26:i386
的 ppa 。libgnutls26
请运行apt-cache policy libgnutls26
并发布输出。也许我可以帮你找到解决方案。
答案2
我遇到了同样的问题,但执行以下命令后不再出现问题:
sudo dpkg --configure -a
sudo apt-get install -f
然后我成功尝试
sudo apt-get install wine1.5
答案3
转到 Ubuntu 软件中心 > 编辑 > 软件源 > 其他软件
并手动删除 ppa:ubuntu-wine/ppa 然后转到 Ubuntu 软件选项卡,并更改:
“下载自”至“主服务器”
然后..
sudo apt-get update && sudo apt-get install wine
对我有用,祝你好运!