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

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

sudo getlibs -i ./hp-netconnect_1.2-12_i386.deb 

包安装成功,我可以使用它,但现在我无法使用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). 

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

使用multiarch,您不需要getlibs ,依赖项应该“只是工作”。 但是,这里的问题是opensslprocpszenity和Java还没有标记为MultiArch: foreign 。 这意味着amd64版本可能适用于此脚本,但dpkg无法看到。

我担心,你最好的方法是编辑.deb ,并删除有问题的依赖项。 有人写了一个脚本来帮助解决这个问题。

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

所以我会尝试:

 sudo dpkg -i --force-architecture --ignore-depends hp-netconnect_1.2-12_i386.deb 

或者,您也可以使用apt –ignore-missing标志来忽略缺少的依赖项。