Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am building an application and I want to build a DEB package, but I have a problem...

I want that the DEB package can be installed both 32 bits machines and 64 bits machines. Then I build a 32 bits package to support both architectures, but I have problems with the dependencies, when a 32 bits system installs the package, works good, but when a 64 bits system installs the package, the dependencies (shared libraries) to be installed should be the 32 bits ones (available on 64 bits repos.)

How can I accomplish that?

share|improve this question

closed as unclear what you're asking by Andrea Corbellini, Thomas W., Braiam, Eliah Kagan, Eric Carvalho Sep 7 '13 at 0:42

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

    
This question is pretty hard to answer without some more detail on what exactly you're trying to do. (Which dependencies, etc.) –  Jorge Castro Jan 28 '12 at 18:21

3 Answers 3

A quick answer is given here: https://help.ubuntu.com/community/32bit_and_64bit#How_to_Make_32-bit_Applications_Work_on_a_64-bit_Operating_System

Installing ia32-libs is surely the fastest solution, however it may not be enough, depending on the situation.

share|improve this answer
    
The problem is that I want to facilitate the installation to user and I don't know if install ia32-libs manually is an easy solution to the user... –  eagleoneraptor Jan 25 '12 at 18:54
    
If you are distributing an Ubuntu package, then you can add a Depends: ia32-libs. Generally, when using a 32-bit application inside a 64-bit environment, you will always need to install/setup something on the environment to make your application work. Otherwise the only solution is to distribute 64-bits applications. –  Andrea Corbellini Jan 26 '12 at 15:52
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Kevin Bowen Dec 28 '12 at 13:56
1  
@maggotbrain: This question is very old, and the solution proposed here is no longer valid. Nowadays, Ubuntu ships with multiarch enabled by default and ia32-libs is no longer the best way to work with 32-bit packages. BTW, the essential part of the wiki page is included (2nd line). –  Andrea Corbellini Dec 28 '12 at 13:59

With multiarch, this is easy. Just build a i386 deb. On an amd64 machine (if all the dependencies have been multi-arched in Ubuntu) the 32-bit versions of them will be installed.

share|improve this answer

In the 64-bit installations, there should be an apt entry for the i386 repo, in which case you use packagename:i386 for the dependency, instead of packagename. An example of this is wine, where you need 32 and 64-bit libs for running all your windows apps.

share|improve this answer

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