Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Installing 32-bit Packages on Ubuntu 14.04

DZone's Guide to

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 ·
Free Resource

How to Transform Your Business in the Digital Age: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

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:

Make your mark on the industry’s leading annual report. Fill out the State of API Integration 2019 Survey and receive $25 to the Cloud Elements store.

Topics:
32-bit ,ubuntu

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}