安装 Wine 时未满足的依赖关系

安装 Wine 时未满足的依赖关系

我正在尝试在 Ubuntu 14.04 中安装 Wine,但有一些未满足的依赖项,我不知道如何修复它们。我尝试手动安装它们,但情况越来越糟。

运行结果sudo apt-get install wine

正在读取包裹清单....完成
构建依赖关系树
正在读取状态信息...完成
您可能需要运行“apt-get -f install”来修复:
以下软件包具有未满足的依赖关系:
 libatk1.0-0:i386:依赖:libc6:i386 (>= 2.2) 但是它将不会被安装
 libclutter-1.0-0:损坏:libclutter-1.0-0:i386(!= 1.16.4-0ubuntu2)但 1.10.0-0ubuntu1 即将安装
 libclutter-1.0-0:i386:依赖:libc6:i386 (>= 2.7) 但是它将不会被安装
                         依赖: libcairo-gobject2:i386 (>= 1.10.0) 但是它将不会被安装
                         依赖: libcairo2:i386 (>= 1.10) 但是它将不会被安装
                         依赖: libcogl-pango0:i386 (>= 1.7.4) 但无法安装
                         依赖: libcogl9:i386 (>= 1.9.8) 但无法安装
                         依赖: libfontconfig1:i386 (>= 2.8.0) 但是它将不会被安装
                         依赖:libgtk-3-0:i386 (>= 3.0.0) 但是它将不会被安装
                         依赖:libjson-glib-1.0-0:i386 (>= 0.12.0) 但是它将不会被安装
                         依赖: libpango1.0-0:i386 (>= 1.29.4) 但是它将不会被安装
                         依赖: libx11-6:i386 (>= 2:1.2.99.901) 但是它将不会被安装
                         依赖:libxcomposite1:i386 (>= 1:0.3-1) 但是它将不会被安装
                         依赖: libxdamage1:i386 (>= 1:1.1) 但是它将不会被安装
                         依赖: libxi6:i386 (>= 2:1.2.99.4) 但是它将不会被安装
                         中断:libclutter-1.0-0 (!= 1.10.0-0ubuntu1) 但将要安装 1.16.4-0ubuntu2
 libcogl15:损坏:libclutter-1.0-0:i386(= 2.17)但不会安装
                     依赖: libffi6:i386 (>= 3.0.4) 但是它将不会被安装
                     依赖: libpcre3:i386 但是它将不会被安装
                     依赖: libselinux1:i386 (>= 1.32) 但是它将不会被安装
                     依赖:zlib1g:i386 (>= 1:1.2.2) 但是它将不会被安装
 libglib2.0-bin:依赖:libglib2.0-0(= 2.40.2-0ubuntu1)但将要安装 2.40.0-2
 wine :取决于:wine1.6
E:未满足依赖关系。运行不带软件包的“apt-get -f install”(或指定解决方案)。

我已经尝试过了:

sudo apt-get update
sudo apt-get install -f

输出:

nelson@nelson-hp:~$ sudo apt-get -f install
Reading package list....Done
Building Dependency tree
Reading state information...Done 
Correcting Dependencies.... failure
The following packages have unmet dependencies:
 libatk1.0-0:i386 : Depends: libc6:i386 (>= 2.2) but it is not installed
 libclutter-1.0-0 : Breaks: libclutter-1.0-0:i386 (!= 1.16.4-0ubuntu2) but 1.10.0-0ubuntu1 is installed
 libclutter-1.0-0:i386 : Depends: libc6:i386 (>= 2.7) but it is not installed
                         Depends: libcairo-gobject2:i386 (>= 1.10.0) but it is not installed
                         Depends: libcairo2:i386 (>= 1.10) but it is not installed
                         Depends: libcogl-pango0:i386 (>= 1.7.4) pero no es instalable
                         Depends: libcogl9:i386 (>= 1.9.8) pero no es instalable
                         Depends: libfontconfig1:i386 (>= 2.8.0) but it is not installed
                         Depends: libgtk-3-0:i386 (>= 3.0.0) but it is not installed
                         Depends: libjson-glib-1.0-0:i386 (>= 0.12.0) but it is not installed
                         Depends: libpango1.0-0:i386 (>= 1.29.4) but it is not installed
                         Depends: libx11-6:i386 (>= 2:1.2.99.901) but it is not installed
                         Depends: libxcomposite1:i386 (>= 1:0.3-1) but it is not installed
                         Depends: libxdamage1:i386 (>= 1:1.1) but it is not installed
                         Depends: libxi6:i386 (>= 2:1.2.99.4) but it is not installed
                         Breaks: libclutter-1.0-0 (!= 1.10.0-0ubuntu1) pero 1.16.4-0ubuntu2 está instalado
 libcogl15 : Breaks: libclutter-1.0-0:i386 (< 1.15) but 1.10.0-0ubuntu1 is installed
 libglib2.0-0:i386 : Depends: libc6:i386 (>= 2.17) but it is not installed
                     Depends: libffi6:i386 (>= 3.0.4) but it is not installed
                     Depends: libpcre3:i386 but it is not installed
                     Depends: libselinux1:i386 (>= 1.32) but it is not installed
                     Depends: zlib1g:i386 (>= 1:1.2.2) but it is not installed
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.40.2-0ubuntu1) but 2.40.0-2 is installed
E: Error, pkgProblemResolver::Unable to correct problems, this may have been caused by held packages.
E: Can't resolve the dependencies

我跑了:

~$ sudo apt-cache policy libclutter-1.0-0:i386

输出:

libclutter-1.0-0:i386:
  Instalados: 1.10.0-0ubuntu1
  Candidato:  1.16.4-0ubuntu2
  Tabla de versión:
     1.16.4-0ubuntu2 0
        500 http://ar.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
 *** 1.10.0-0ubuntu1 0
        100 /var/lib/dpkg/status

答案1

首先你应该安装 synaptic

sudo apt-get 安装 synaptic

然后从突触安装杯子(通过检查突触中的杯子),它将处理依赖关系。

答案2

这是安装您想要的任何 Wine 版本而无需处理外部存储库的过程,这是手动过程。

在 Debian/Ubuntu 系统存储库中安装比最新版本更旧或不同的 Wine 版本是一件非常麻烦的事。

计划 B:如果可能的话,考虑转到 Manjaro。为什么?因为 Manjaro 版本的 Wine 软件包捆绑在一个软件包中,您可以使用单个命令安装它:

sudo pacman -U /local_path/wine-staging-5.1-1-x86_64.pkg.tar.zst
or, in the case you miss dependencies..
sudo pacman -Sy /path/wine...
(I think that's the command... I'm not in Manjaro right now,
the Sy command will download the dependencies for you 
WITHOUT performing a full system upgrade, only the packages you need...
pacman -U is the equivalent of sudo dpkg -i , for manual install)

好的。如果您无法转到 Arch/Manjaro,以下是在基于 Debian/Ubuntu 的发行版上手动安装旧版本 Wine 的步骤:

  1. 假设您要安装 Wine 版本 4.1(Wineprefix 大小从 100 MB 直接增加到 600 MB 之前的最后一个 Wine 版本之一,没有任何额外的好处,也没有避免过去 10 年常见的错误...)
    转到https://dl.winehq.org/wine-builds/
    并下载所有名称中包含 4.1 的软件包(它们应该具有相同的日期)

对于 Wine 4.1(我发现的最佳版本),这些就是您需要的软件包。您总共需要五个软件包。

winehq-staging_4.1_buster_amd64.deb
wine-staging_4.1_buster_amd64.deb
wine-staging_4.1_buster_i386.deb
wine-staging-amd64_4.1_buster_amd64.deb
wine-staging-i386_4.1_buster_i386.deb
  1. 安装顺序。这是最棘手的部分,第一次安装后,下次应该会更容易。首先,始终安装最大的 i386 包。然后,安装小的 i386 包。然后,安装大的 amd64 包和小的 amd64 包。最后安装的应该是 winehq(仅以 amd64 格式提供)

下面是我的 bash 历史记录的副本,其中列出了我在最短时间内执行此操作时使用的命令顺序。

sudo dpkg --add-architecture i386
sudo apt-get update
sudo dpkg -i /path/wine-staging-i386_4.1_buster_i386.deb
sudo apt-get install -f
sudo dpkg -i /path/wine-staging_4.1_buster_i386.deb
sudo apt-get install -f
sudo dpkg -i /path/wine-staging-amd64_4.1_buster_amd64.deb
sudo apt-get install -f
sudo dpkg -i /path/wine-staging_4.1_buster_amd64.deb
sudo apt-get install -f
sudo dpkg -i /path/winehq-staging_4.1_buster_amd64.deb
sudo apt-get install -f
sudo apt-get update
...
winecfg    <used to create the initial Wine prefix>
<use these ones below to reassure that you have all libs installed correctly>
...
WINEPREFIX=~/.wine32 WINEARCH=win32 winecfg  <to test if 32-bit is working OK>
WINEPREFIX=~/.wine64 WINEARCH=win64 winecfg  <to test if 64-bit is working OK>
<you should not see errors in the terminal of the type
"but the wrong architecture is being used" >

注意你需要如何运行

sudo apt-get install -f  

每次安装每个软件包时。这将确保在安装下一个软件包之前,安装和配置每个软件包的各个依赖项。(这仅在您第一次执行此操作时才需要……之后,您可以将所有这些依赖项放在备份位置,然后使用 sudo dpkg -i /path/*.deb 一次性安装它们)

  1. 有时,我不明白为什么会发生这种情况,您将无法使用 Wine 64 位,或者您将无法使用 Wine 32 位,两者之一。如果发生这种情况,只需重新安装其中一个大型 Wine 软件包(取决于您是否需要 amd64 或 i386)

    sudo dpkg -i /path/wine-staging-amd64_4.1_buster_amd64.deb

很不幸,Wine 在 Debian/Ubuntu 系统上以这种方式分发,这是一个过于复杂的过程,浪费了大量的时间。Manjaro 的做法应该成为 Wine 从现在开始的官方分发方式。

相关内容