Over a million developers have joined DZone.

Installing 32-bit Packages on Ubuntu 14.04

Need to install 32-bit packages on Ubuntu 14.04? These quick code snippets will get you up and running.

· Integration Zone

Learn how API management supports better integration in Achieving Enterprise Agility with Microservices and API Management, brought to you in partnership with 3scale

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:

Unleash the power of your APIs with future-proof API management - Create your account and start your free trial today, brought to you in partnership with 3scale.

Topics:
32-bit ,ubuntu

Published at DZone with permission of Rob Allen, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}