Is it possible to install 32-bit and 64-bit versions of a library at the same time.

Asked by Diaa Sami

I was trying to run FreeArc(a 32-bit app) on my 64-bit Jaunty when I discovered that it needs a 32-bit library that I don't have, namely libgmp

After a bit of searching I was able to run it by installing the 32-bit version of libgmp by downloading it manually from packages.ubuntu.com and installing it with the --force-architecture option, the program ran properly, after that I needed to install 7z(from the p7zip package), to my surprise the package manager(synaptic) asked to re-install libgmp so i just proceeded, as soon as 7zip was installed, FreeArc stopped running complaining about libgmp not existing.

It seems to me that it's not possible to have both 32-bit and 64-bit versions of a certain library installed at the same time, is this true? are there any work-arounds?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ia32-libs Edit question
Assignee:
No assignee Edit question
Solved by:
Diaa Sami
Solved:
Last query:
Last reply:
Revision history for this message
Appiah (appiah) said :
#1

Check this package out , maybe something you're looking for :
http://packages.ubuntu.com/sv/jaunty/ia32-libs

Revision history for this message
Diaa Sami (diaa.sami) said :
#2

I already have ia32-libs installed but it doesn't fix the problem, can you explain?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

You can force install it, you will need to also install 32bit libs to satisfy deps

Revision history for this message
Diaa Sami (diaa.sami) said :
#4

I know I can force install it, I mentioned this in my question, the problem is that I can't have two versions(32-bit and 64-bit) of the same library installed concurrently.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Sure you can:

you have:

/usr/lib
/usr/lib32
/usr/lib64

So you will install the 32bit libs to /usr/lib32

Revision history for this message
Diaa Sami (diaa.sami) said :
#6

yes I know I can manually do this but I'm wondering whether apt(and dpkg) support this(read the question please)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Yes it will be managed. I dont recommend it personally but it can be done.

Revision history for this message
Diaa Sami (diaa.sami) said :
#8

I have just done an experiment to prove that's not true.

1- Install 64-bit recode(which depends on librecode0) from synaptic or apt-get.
2- Manually download and install 32-bit librecode0 from packages.ubuntu.com (using dpkg -i --force-architecture)
3- Now you should be still be able to run the 64-bit recode(which depends on the library) but that's not true, when running it I get an error about missing librecode, furthermore, when I check out /usr/lib/librecode.so.0.0.0 I found out that it's a 32-bit library, it has overwritten the 64-bit version.

Revision history for this message
Douglas Moyes (aragorn-stellimare) said :
#9

You have to be careful with this. I had a major issue with this on Fedora, which is one reason why I stopped using it.

Your native libraries should be installed in /lib and /usr/lib (Fedora puts them in /usr/lib64 and leaves the 32-bit libraries in /usr/lib which is all kinds of bad, esp. when compiling new software).

By default, any library, regardless of the target architecture, will be put in /usr/lib, /lib, or /usr/local/lib.

If you want to install the 32-bit libraries, you will need to install them manually. Unpack the package using:
dpkg -X

Next, put the libraries wherever you want them to go. --force-architecture was the wrong choice. It made the package manager think it was running on a 32-bit system, and installed the packages in the correct place for a 32-bit, not 64-bit, system.

For best results, do:

sudo apt-get install linux32 lsb

Revision history for this message
Diaa Sami (diaa.sami) said :
#10

Ok, so using -force-architecture is wrong and it must be done manually.

Revision history for this message
thometal (thometal) said :
#11

Did it work? So you are now using Freearc 32bit under Ubuntu 64 bit?

Here I have create a Bug for packing FreeArc. Maybe you want to subscribe.

https://bugs.launchpad.net/ubuntu/+bug/473471

Revision history for this message
Diaa Sami (diaa.sami) said :
#12

Yes it did work, I used getlib to install dependencies

http://ubuntuforums.org/showthread.php?t=474790