2

I had a project which uses libudev and libusb libraries.

Operating System: Ubuntu 18.04 64-bit

Initially the application was 64-bit, so there was no issue.

Now, there is a new requirement of supporting 32-bit. When i tried to compile by adding -m32 to my build Makefile, it throws the following error.

/usr/bin/ld: cannot find -ludev
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libusb-1.0.so when searching for -lusb-1.0
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libusb-1.0.a when searching for -lusb-1.0
/usr/bin/ld: cannot find -lusb-1.0
collect2: error: ld returned 1 exit status

I used the following commands to install 64-bit versions:

sudo apt-get install libudev-dev
sudo apt-get install libusb-1.0-0-dev

I tried the following command but it didn't work

sudo apt-get install libudev1:i386

What is the command to install 32-bit version of these libraries?

1 Answer 1

3

You need to install the i386 development packages:

sudo apt install libudev-dev:i386 libusb-1.0-0-dev:i386

These two are co-installable with their amd64 versions so you won’t need to uninstall anything.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.