Ubuntu – How to install 32-bit deb package on 64-bit ubuntu

11.10aptdependenciesmultiarch

I have Ubuntu 11.10 64-bit installed and I have to install 32-bit deb package on it. It depends on other 32 bit libraries. I overcome this with getlibs:

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

Package is installed successfully and I can use it, but now I can't install anything with 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).

If I run 'apt-get -f install', it just removes hp-netconnect package. Now I have to uninstall this package with 'apt-get -f install' every time I want to install something and reinstall it later.

Best Answer

With multiarch, you don't need getlibs, the dependencies should "just-work". However, the problem here is that openssl, procps, zenity, and Java haven't been marked as MultiArch: foreign yet. Meaning that the amd64 versions will probably work for this script, but dpkg can't see that.

I'm afraid, your best way around this is probably to edit that .deb, and remove the problematic dependencies. Somebody wrote a script to help with that.

Related Question