如何在 64 位 ubuntu 上安装 32 位 deb 包?

Yur*_*ras 5 apt dependencies 11.10 multiarch

我安装了 Ubuntu 11.10 64 位,我必须在其上安装 32 位 deb 包。它取决于其他 32 位库。我用 getlibs 克服了这个问题:

sudo getlibs -i ./hp-netconnect_1.2-12_i386.deb 
Run Code Online (Sandbox Code Playgroud)

包已成功安装,我可以使用它,但现在我无法使用 apt-get 安装任何东西:

ytaras@bueno:~/Downloads$ sudo apt-get install bison-doc 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 hp-netconnect:i386 : Depends: openssl:i386 but it is not going to be installed
                      Depends: procps:i386 but it is not going to be installed
                      Depends: zenity:i386 but it is not going to be installed
                      Depends: sun-java6-jre:i386 but it is not installable or
                               sun-java5-jre:i386 but it is not installable
                      Recommends: sun-java6-plugin:i386 but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Run Code Online (Sandbox Code Playgroud)

如果我运行 'apt-get -f install',它只会删除 hp-netconnect 包。现在,每次我想安装某些东西并稍后重新安装时,我都必须使用“apt-get -f install”卸载此软件包。

Mic*_*l K 5

您可以在 ubuntu 上安装 32 位软件包,使用 dpkg 和 --ignore-depends 标志。如果你这样做,这个包的依赖关系应该被忽略。

所以我会尝试:

sudo dpkg -i --force-architecture --ignore-depends hp-netconnect_1.2-12_i386.deb
Run Code Online (Sandbox Code Playgroud)

或者,您也可以通过附加 --ignore-missing 标志忽略 apt 缺少的依赖项。


tum*_*eed 1

使用多架构,您不需要getlibs,依赖项应该“正常工作”。然而,这里的问题是opensslprocpszenity、 和 Java 还没有被标记MultiArch: foreign。这意味着 amd64 版本可能适用于此脚本,但dpkg看不到这一点。

恐怕,解决这个问题的最佳方法可能是编辑它.deb,并删除有问题的依赖项。有人写了一个脚本来帮助解决这个问题。