This had me stumped for a bit, so I've written it down. If you have a 64 bit version of Ubuntu and want to install a 32-bit package, you simply add :i386 to the end of the package name like this:
$ sudo apt-get install libstdc++6:i386
However, this didn't initially work for me as apt-get couldn't find the package:
$ sudo apt-get install libstdc++6:i386 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libstdc++6 E: Couldn't find any package by regex 'libstdc++6'
It turned out that my installation only had the 64 bit architecture configured which you can tell by running:
$ sudo dpkg --print-architecture amd64 $ sudo dpkg --print-foreign-architectures
Note that there are no foreign architectures, which is the problem.
The solution is to add the i386 architecture first:
$ sudo dpkg --add-architecture i386 $ sudo dpkg --print-foreign-architectures i386
That's better! Now we need to run an update:
$ sudo apt-get update
Don't forget this update! I did and wondered why I still had the problem…
Now the installation of the 32-bit package works:
$ sudo apt-get install libstdc++6:i386 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: gcc-4.8-base:i386 gcc-4.9-base:i386 libc6:i386 libgcc1:i386 Suggested packages: glibc-doc:i386 locales:i386 The following NEW packages will be installed: gcc-4.8-base:i386 gcc-4.9-base:i386 libc6:i386 libgcc1:i386 libstdc++6:i386 0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded. Need to get 4,342 kB of archives. After this operation, 11.3 MB of additional disk space will be used. Do you want to continue? [Y/n] Y ... lots of lines as the library installs ...