0

This question already has an answer here:

I have tried several alternatives from answers to similar questions (1, 2 and 3) (see also below) to get the libraries I need. It still doesn't work and I get this error message when trying to run my 32-bit software on my 64 bit system (Lubuntu 15.10):

$ ./aiStarter: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

[1]+  Exit 127                ./aiStarter

So this is what I've tried:

$ sudo dpkg --add-architecture i386

$ sudo apt-get install libstdc++6:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libc6-i386
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  gcc-5-base:i386 libc6:i386 libgcc1:i386
Suggested packages:
  glibc-doc:i386 locales:i386
The following NEW packages will be installed:
  gcc-5-base:i386 libc6:i386 libgcc1:i386 libstdc++6:i386
0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
Need to get 4 537 kB of archives.
After this operation, 12,0 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y    #Answered yes, etc...

$ sudo apt-get install package:i386
Reading package lists... Done    
Building dependency tree       
Reading state information... Done
E: Unable to locate package package

$ sudo apt-get install build-essential:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential:i386 : Depends: gcc:i386 (>= 4:5.2) but it is not going to be installed
                    Depends: g++:i386 (>= 4:5.2) but it is not going to be installed
                    Depends: dpkg-dev:i386 (>= 1.17.11)
E: Unable to correct problems, you have held broken packages.

Also tried my hand at finding exactly what package it is I actually need (not sure if it's even the correct way):

$ apt-file update
$ sudo apt-file -x search '/libz.so.1$'
E: The cache is empty. You need to run 'apt-file update' first.

Other ways I should try?

marked as duplicate by fkraiem, karel, Fabby, user535733, Kevin Bowen Jun 4 '18 at 20:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Install dependencies 32 bits in 64 bit envirennements:

sudo apt-get install build-essential gcc-multilib gcc-4.8-multilib g++-multilib g++-4.8-multilib lib32z1 lib32ncurses5 lib32bz2-1.0 libc6-dev libgmp-dev libmpfr-dev libmpc-dev

Install the librarie

sudo dpkg --add-architecture i386
  • Some of this might have helped too, although I'd already tried the build-essential and sudo dpkg --add-architecture i386. What I needed in the end is stated in my own answer to the question. – Ingrid Feb 19 '16 at 10:02
  • you need to istall some dependiences before installing the librarie – GAD3R Feb 19 '16 at 10:09
0

Installing the following solved my problem: cpp-5:i386, gcc:i386, g++:i386 and dpkg-dev:i386. (I noticed that you could actually read something out from the last error message in my question.)

0

Your attempt to locate the missing package containing the 32 bit libz would have succeeded if you had not used "sudo". The output contains several possibilities, lib32z1:i386 or libx32z1:i386 being reasonable choices. If you successfully build your 32 bit executable, and the load started, you apparently have all the other parts needed to execute 32 bit executables.

Not the answer you're looking for? Browse other questions tagged or ask your own question.