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 writing a little program which uses libpcap and my target machine is i386, while my dev machine is x86_64.

Now, when I install libpcap0.8:i386, which works, I get under /usr/lib/i386_linux_gnu/ libpcap.so.0.8 and libpcap.so.1.1.1 but NOT libpcap.so I installed libpcap0.8-dev on a 32bit VM and it seems like this package contains the symlink libpcap.so

When I want to compile my program with -m32 -L/usr/lib/i386_linux_gnu/ -lpcap that just won't work, because it can't find the library (obviously). So I have to use ugly hacks like specifying the version with -l:lipcap.so.1.1.1 or by creating a symlink manually.

Trying to install libpcap0.8-dev:i386 gives me dependency hell (open: 65; closed: 238; defer: 25; conflict: 40).

So is there a beautiful way to fix this, in a way using the package system how it's supposed to work, or do I need to stick with my ugly hacks. Or is this a bug and I should file a report?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Well, I just created a symlink from '/usr/lib/x86_64-linux-gnu/libpcap.so' to '/usr/lib/x86_64-linux-gnu/libpcap.so.0.8'

share|improve this answer
add comment

Multiarch isn't pervasive yet, only some of the most common libraries have been multi-arched.

So, instead of cross-building using multi-arched libraries, why don't you just build your app in a 32bit chroot? I described how to do that here.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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