我知道有很多问题,wine
但我找不到或无法解决这些问题。有人能帮我修复 Wine 安装吗?
以下是尝试修复该问题时的命令输出:
sudo dpkg --add-architecture i386
sudo apt-get dist-upgrade
Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
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.6 but it is not going to be installed or wine1.7 but it is not going to be installed E: Unable to correct problems, you have held broken packages.
sudo apt-get install wine1.6
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.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4) E: Unable to correct problems, you have held broken packages.
sudo apt-get install wine1.6:i386
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.6:i386 : Depends: wine1.6-i386:i386 (= 1:1.6.2-0ubuntu4) Recommends: winbind:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages.
我也尝试过:
更新 1
修复了所有
sudo apt-get update
错误
但仍然不能sudo apt-get install wine
更新 2
正如@Sneetsher 向我提到的那样。
最后一个命令的输出,与步骤的输出相同3
更新 3
根据@AB 请求。
uname -a
Linux bad 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 wine1.7
wine: Installed: (none) Candidate: 1:1.7.55-0ubuntu1 Version table: 1:1.7.55-0ubuntu1 0 500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ trusty/main amd64 Packages 1:1.6.2-0ubuntu4 0 500 http://mirrors.163.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://mirrors.163.com/ubuntu/ trusty/universe amd64 Packages wine1.7: Installed: (none) Candidate: 1:1.7.55-0ubuntu1 Version table: 1:1.7.55-0ubuntu1 0 500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ trusty/main amd64 Packages
更新 4
根据@Sneetsher 的要求。
apt-cache policy acl adduser apt apt-utils aspell aspell-en at-spi2-core base-passwd binfmt-support busybox-initramfs ca-certificates cabextract colord coreutils cpio cpp cpp-4.8 cups-bsd cups-client cups-common dbus dconf-gsettings-backend dconf-service debconf debconf-i18n debianutils dh-python dictionaries-common dpkg e2fslibs e2fsprogs enchant file findutils fontconfig fontconfig-config fonts-dejavu-core fonts-droid fonts-horai-umefont fonts-liberation fonts-unfonts-core fonts-wqy-microhei gcc-4.8-base gcc-4.9-base ghostscript glib-networking glib-networking-common glib-networking-services gnome-exe-thumbnailer gnupg gpgv gsettings-desktop-schemas gsfonts gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x hicolor-icon-theme hunspell-en-us icoutils ifupdown imagemagick imagemagick-common init-system-helpers initramfs-tools initramfs-tools-bin initscripts insserv iproute2 isc-dhcp-client isc-dhcp-common iso-codes klibc-utils kmod krb5-locales libaa1 libacl1 libapparmor1 libapt-inst1.5 libapt-pkg4.12 libarchive-extract-perl libasn1-8-heimdal libasound2 libasound2-data libasound2-plugins libaspell15 libasyncns0 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libattr1 libaudit-common libaudit1 libauthen-sasl-perl libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libblkid1 libbsd0 libbz2-1.0 libc6 libcaca0 libcairo-gobject2 libcairo2 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra0 libcap2 libcapi20-3 libcdparanoia0 libcgmanager0 libcloog-isl4 libcolord1 libcolorhug1 libcomerr2 libcroco3 libcups2 libcupsfilters1 libcupsimage2 libdatrie1 libdb5.3 libdbus-1-3 libdbus-glib-1-2 libdconf1 libdebconfclient0 libdjvulibre-text libdjvulibre21 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdv4 libelf1 libenchant1c2a libencode-locale-perl libexif12 libexpat1 libffi6 libfftw3-double3 libfile-basedir-perl libfile-copy-recursive-perl libfile-desktopentry-perl libfile-listing-perl libfile-mimeinfo-perl libflac8 libfont-afm-perl libfontconfig1 libfontenc1 libfreetype6 libgcc1 libgcrypt11 libgd3 libgdbm3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgeoclue0 libgif4 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglib2.0-data libglu1-mesa libgmp10 libgnutls26 libgomp1 libgpg-error0 libgphoto2-6 libgphoto2-l10n libgphoto2-port10 libgpm2 libgraphite2-3 libgs9 libgs9-common libgssapi-krb5-2 libgssapi3-heimdal libgstreamer-plugins-base0.10-0 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer0.10-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libgusb2 libharfbuzz-icu0 libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhunspell-1.3-0 libhx509-5-heimdal libice6 libicu52 libidn11 libiec61883-0 libieee1284-3 libijs-0.35 libilmbase6 libio-html-perl libio-socket-inet6-perl libio-socket-ssl-perl libisl10 libjack-jackd2-0 libjasper1 libjavascriptcoregtk-3.0-0 libjbig0 libjbig2dec0 libjpeg-turbo8 libjpeg8 libjson-c2 libjson0 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.4-2 libldb1 libllvm3.4 liblocale-gettext-perl liblog-message-simple-perl liblqr-1-0 libltdl7 liblwp-mediatypes-perl liblwp-protocol-https-perl liblzma5 libmagic1 libmagickcore5 libmagickcore5-extra libmagickwand5 libmailtools-perl libmodule-pluggable-perl libmount1 libmpc3 libmpdec2 libmpfr4 libmpg123-0 libncurses5 libncursesw5 libnet-http-perl libnet-libidn-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetpbm10 libnih-dbus1 libnih1 libnotify4 libntdb1 libodbc1 libogg0 libopenal-data libopenal1 libopenexr6 liborc-0.4-0 libosmesa6 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpcap0.8 libpciaccess0 libpcre3 libpipeline1 libpixman-1-0 libplymouth2 libpng12-0 libpod-latex-perl libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libpopt0 libprocps3 libproxy1 libpulse0 libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib libraw1394-11 libreadline6 libroken18-heimdal librsvg2-2 librsvg2-common libsamplerate0 libsane libsane-common libsasl2-2 libsasl2-modules libsasl2-modules-db libsecret-1-0 libsecret-common libselinux1 libsemanage-common libsemanage1 libsepol1 libshout3 libslang2 libsm6 libsmbclient libsndfile1 libsocket6-perl libsoup2.4-1 libspeex1 libspeexdsp1 libsqlite3-0 libss2 libssl1.0.0 libstdc++6 libsystemd-daemon0 libsystemd-login0 libtag1-vanilla libtag1c2a libtalloc2 libtasn1-6 libtdb1 libterm-ui-perl libtevent0 libtext-charwidth-perl libtext-iconv-perl libtext-soundex-perl libtext-wrapi18n-perl libthai-data libthai0 libtheora0 libtiff5 libtimedate-perl libtinfo5 libtxc-dxtn-s2tc0 libudev1 liburi-perl libusb-0.1-4 libusb-1.0-0 libustr-1.0-1 libuuid1 libv4l-0 libv4lconvert0 libvisual-0.4-0 libvisual-0.4-plugins libvorbis0a libvorbisenc2 libvorbisfile3 libvpx1 libwavpack1 libwayland-client0 libwayland-cursor0 libwbclient0 libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libwebp5 libwind0-heimdal libwmf0.2-7 libwrap0 libwww-perl libwww-robotrules-perl libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxfont1 libxft2 libxi6 libxinerama1 libxkbcommon0 libxml2 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt6 libxtables10 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 lsb-base lsb-release makedev mime-support module-init-tools mount mountall multiarch-support netbase netpbm notification-daemon ocl-icd-libopencl1 odbcinst odbcinst1debian2 openssl p11-kit-modules p7zip passwd patch perl perl-base perl-modules plymouth plymouth-theme-ubuntu-text policykit-1 poppler-data procps psmisc python python-apt python-apt-common python-chardet python-crypto python-debian python-ldb python-minimal python-ntdb python-samba python-six python-talloc python-tdb python2.7 python2.7-minimal python3 python3-apt python3-minimal python3.4 python3.4-minimal readline-common samba-common samba-common-bin samba-libs sed sensible-utils sgml-base shared-mime-info smbclient sound-theme-freedesktop sudo systemd-services systemd-shim sysv-rc sysvinit-utils tar tcpd ttf-mscorefonts-installer ttf-wqy-microhei tzdata ubuntu-keyring ucf udev unixodbc unzip update-inetd update-notifier-common upstart util-linux uuid-runtime wget wine-gecko2.34 wine-mono4.5.4 wine1.7 wine1.7-amd64 wine1.7-i386 winetricks x11-common x11-utils x11-xserver-utils xdg-utils xfonts-encodings xfonts-utils xkb-data xml-core xz-utils zenity zenity-common zip zlib1g
完整输出已上传这里。
更新 5
在我按照 Sneetsher 的建议安装 wine 之后,我仍然无法
.exe
使用 wine 运行文件。以下是屏幕截图:wine ~/.wine/drive_c/windows/notepad.exe
是顶部窗口。底部的两个窗口都是OLLYDBG.EXE
通过单击打开的。我无法通过记事本进行任何编辑。
$ wine --version wine-1.6.2 $ which wine /usr/local/bin/wine
如果我需要提供更多信息,请告诉我。
答案1
这将是上述评论中的试验的恢复,相关聊天室问题已得到解决。
我们尝试过但没有成功:
- 启用 i386 架构
sudo dpkg --add-architecture i386
,因为 Wine 需要许多来自 32 位存储库的依赖项。 - OP 创建新的
sources.list
启用所有组件。 - 禁用所有 PPA(使用 检查
grep -r "^deb" /etc/apt/sources.list.d/
) aptitude
它给出了许多解决方案,但所有解决方案都试图删除大多数已安装的桌面软件包(>200 个软件包)或保持原样而不安装 Wine。- 安装 1.6 而不是 1.7
sudo apt-get install wine=1:1.6.2-0ubuntu4
,同样出现未解决的依赖关系消息。 使用追踪冲突
apt-get install
,然后得到分支。The following packages have unmet dependencies: libglu1-mesa:i386 : Depends: libgl1-mesa-glx:i386 or libgl1:i386 E: Unable to correct problems, you have held broken packages.
通过这种方式寻找冲突是不切实际的,浪费精力和时间。
因此,我们正在寻找的可能是一个遥远的(不是直接的)依赖包:
- 在官方存储库 + Wine PPA 中不可用。
或者已安装但版本不是来自官方存储库 + Wine PPA。
(即安装的版本高于存储库中可用的版本。
apt-get
并且aptitude
不提供降级某些软件包的解决方案)
以下是恢复的步骤:
- 添加回 Wine PPA
我
debfoster
在我的计算机上安装了与 OP 系统相同的版本 (14.04)。生成 wine 所有递归依赖项的列表:debfoster -d wine
(为什么会这样?OP 无法在他的计算机上运行这个程序,因为
debfoster
类似apt-cache
程序只适用于已安装的软件包)要求 OP 提供
apt-cache policy ...
上一步中生成的列表的输出。(问题中的更新 4)然后存储以前的输出并进行过滤以便于审查:
grep -e "^[a-zA-Z]" -e "^[ ]*\*\*\*" -e "^[ ]*[1-9]00" -e "^[* ]*[0-9][0-9a-zA-Z:+_~.-]* 0" wine_policy_output.txt
找到了这些包:
libdrm-intel1: *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0 100 /var/lib/dpkg/status 2.4.60-2~ubuntu14.04.1 0 500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages 2.4.56-1~ubuntu2 0 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 2.4.52-1 0 500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages libdrm-nouveau2: *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0 100 /var/lib/dpkg/status 2.4.60-2~ubuntu14.04.1 0 500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages 2.4.56-1~ubuntu2 0 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 2.4.52-1 0 500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages libdrm-radeon1: *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0 100 /var/lib/dpkg/status 2.4.60-2~ubuntu14.04.1 0 500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages 2.4.56-1~ubuntu2 0 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 2.4.52-1 0 500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages libdrm2: *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0 100 /var/lib/dpkg/status 2.4.60-2~ubuntu14.04.1 0 500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages 2.4.56-1~ubuntu2 0 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 2.4.52-1 0 500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages libwayland-client0: *** 1.7.0-0ubuntu1~trusty1 0 100 /var/lib/dpkg/status 1.4.0-1ubuntu1 0 500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages libwayland-cursor0: *** 1.7.0-0ubuntu1~trusty1 0 100 /var/lib/dpkg/status 1.4.0-1ubuntu1 0 500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
这些似乎来自“xorg-edgers 全新 X 破解版”. 将它们降级到存储库中可用的版本:
sudo apt-get install \ libdrm2=2.4.60-2~ubuntu14.04.1 \ libdrm-intel1=2.4.60-2~ubuntu14.04.1 \ libdrm-nouveau2=2.4.60-2~ubuntu14.04.1 \ libdrm-radeon1=2.4.60-2~ubuntu14.04.1 \ libwayland-client0=1.4.0-1ubuntu1 \ libwayland-cursor0=1.4.0-1ubuntu1
仍然无法安装 wine,我们寻找任何其他可疑包:
libcgmanager0: *** 0.39-2ubuntu2~ubuntu14.04.1 0 100 http://mirrors.163.com/ubuntu/ trusty-backports/main amd64 Packages 100 /var/lib/dpkg/status 0.24-0ubuntu7.5 0 500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages 0.24-0ubuntu7.1 0 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 0.24-0ubuntu5 0 500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
这个:第一点,它是从反向移植而来的。第二点,当前版本 0.39 与稳定存储库中的 0.24 相差太大。降级它:
sudo apt-get install libcgmanager0=0.24-0ubuntu7.5
现在
wine
安装顺利完成sudo aptitude install wine
关于渲染问题,窗口是灰色的。从 1.6 开始似乎如此wine --version
,但我们已经安装了 1.7 并且which wine
系统已从源代码安装了本地版本的 wine。
尝试一下echo $PATH
,你会发现类似这样的事情:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
看...变量 PATH,它是系统查找可执行文件的地方。因此,只需wine
在 shell 中写入,它就会在/usr/local/sbin
文件夹中查找,如果未找到,/usr/local/bin
则.../usr/sbin
/usr/bin
快速修复,删除本地的 wine 副本:
sudo rm /usr/local/bin/wine*
如果你想保留它,你可以使用完整路径运行 wine:
/usr/bin/wine ...
更新:
我可以在全新安装的 Ubuntu 14.04 上重现同样的问题。我确认唯一有问题的软件包是我不知道它是如何安装的libcgmanager0
版本。0.39-2ubuntu2~ubuntu14.04.1
来自的包裹“xorg-edgers 全新 X 破解版”PPA 是干净的,我建议降级它们作为隔离问题的程序。
参考:
答案2
“我按照 Sneetsher 的建议安装了 wine。但我仍然无法使用 wine 运行 >.exe 文件。”
右键单击 exe 文件并选择属性。然后在权限选项卡中选中“允许作为程序执行”,或打开终端窗口并 {chmod +x/路径/到/文件/file.exe}
答案3
使用 aptitude 而不是 apt-get。它更智能。它不仅可以帮您处理冲突软件包的降级,还会提出一系列建议,询问您希望使用众多可能的建议工作方案中的哪一种。
sudo aptitude install myNewPackage
如果你的机器上还没有 aptitude,可以使用
sudo apt-get install aptitude
答案4
打开软件和更新及以下其他软件标签
- 启用规范合作伙伴存储库。
在下面“更新”选项卡使能够,
- 推荐更新
- 不支持的更新
选择“关闭”并“重新加载”
最好逐个勾选未选中的存储库。然后“关闭”、“重新加载”,然后执行sudo apt-get install wine
这样你就可以准确地找出你缺少哪个存储库。