How to go about installing 32 bit dependencies for PureOS

Just recently received my librem15 and have been pleased so far. I’ve been using Linux for a few years now but am far from an expert aside from some basic command-line knowledge. Recently I have been trying to install a program that requires several 32-bit libraries to be installed:


Since these don’t seem to be in the purism repos what is the recommended way of obtaining and installing them. Sorry in advance for my ignorance but in the past it has always been a simple “apt-get install” with Ubuntu to install these libraries and I never had to delve deeper. I’m not exactly sure how I would get them from a Debian source while ensuring that everything is compatible.

I did not double-check, but I think the situation is:

  • ia32-libs has been deprecated/removed years ago from Debian (7? 8?)
  • I think, PureOS does not provide i386 libs (not much need)
    So you would have to use old Debian libs. On

It’s also very likely that the PureOS default kernel does not support 32bit binaries.

I would suggest a VM. Either as a solution, or as a test bed, just so you don’t butcher your system :wink:

Well after some unsucessful floundering aroud, I decided to put off using PureOS for now and was able to successfully install the libraries using an alternative Debian-based distro (based on the Stretch stable release). The libraries are required for the installation of MPLABX (which is Microchip’s IDE used for programming their microcontrollers) Some of the libraries have apparently changed compared to Microchips documentation but apt-get install informs of newer versions which are compatible and I was able to get them from the repository. Considering that MPLABX is very much a tool in use today and considering that other current Debian distros include the required libraries in their repositories, perhaps PureOS could include them as well someday. Not so much a complaint as a request and I appreciate all of the hard work that the Purism team puts into the Librem line and PureOS!Thanks Caliga for taking the time to respond.

1 Like

I’d echo the statement from @ht45. Some work-related software tools (e.g. MPLABX) require the 32bit binaries. The installation instructions from systems like Ubuntu do not apply to PureOS.

I think Caliga is right here and that PureOS would need to enable the 32 bit architecture in our software repositories to enable 32 bit apps to be installed as binaries. Because we make our own hardware (which is all 64 bit, including the phone), it doesn’t make a ton of sense for us to enable 32 bit builds. In addition, 64 bit GNU/Linux is now at least a decade old. Microchip has contributed to the Linux kernel so I’m sure they are able to update their IDE to 64 bits.

A quick search reveals that the MPLABX is moving to 64 bit only:

1 Like

Well, I’d like some tips on how to run a 32-bit program. I wrote the first command-line JavaScript shell a gajillion years ago, based on the 32-bit SpiderMonkey engine. Since then, Mozilla went off the deep end and nobody, not even them, knows how to compile their source code. So I’d like to continue using the same obsolete binaries.

Would be great to somehow run 32-bit code on my new laptop.

Would something like Gnome Boxes work for you? You could just do your work in a virtual machine with an OS that supports 32 bit binaries.


There are a number of ways to running 32bit apps. One way is a VM as mentioned in this thread, another way is through the use of dpkg, which is a low-level Debian package tool. This would essentially make your machine a multi-architecture machine. More info can be found in the link below;

But that only enables installation of 32 bit packages. You still need a repository with 32 bit libs or add each one manually. And the kernel needs to have the 32 bit ABI enabled.
I could imagine you need quite a few until Spider Monkey works, and they would need to be compatible with that old version.

You could use Debian’s 32 bit libraries by enabling Debian repos in /etc/apt/source.list.d/. As for the kernel ABI that might require considerably more work if you’re using PureOS. A virtual machine might be a lot easier.

1 Like

Thanks for the advice! Multiarch sort of worked until I tried to install libstc++ and ran into version conflicts. But if the ABI is turned off in the kernel … oy vey.

Will try again later.

If you want to try it yourself

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install multiarch-support
nano sudo nano /etc/apt/sources.list
-> deb [arch=i386] jessie main contrib non-free
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

1 Like

Installing a VM in virt-manager is pretty simple, you can have any other Linux distro you choose, even share folders to linux guests natively with filesystem passthrough (with 9p-virtio).
Also, the gnome Boxes app sucks. I tried installing a debian vm there and it just downloaded a 2GB iso and got stuck doing nothing. The UI is simple, but too simple, a lot of basic features for a VM manager are lacking…

1 Like

I ran into the same issue installing 32-bit dependencies from the Debian repos.

I did check that the ABI is enabled in the kernel, and it is, the following runs fine:

# as test32.s --32 -o test32.o && ld test32.o -static -melf_i386 -o test32
.global _start

      movl    $len,%edx
      movl    $msg,%ecx
      movl    $1,%ebx
      movl    $4,%eax
      int     $0x80
      movl    $0,%ebx
      movl    $1,%eax
      int     $0x80

.section .rodata
    .ascii    "Hello, world!\n"
    len = . - msg

So anything statically compiled should work.