Libexpat not found by linux system

I am developing a vddk library for ubuntu 12.10 i386. I constantly get the following error:

Cannot open library: libexpat.so.0: cannot open shared object file: No such file or directory. 

When I ran apt-file search libexpat.so it shows me the following

 lib64expat1: /usr/lib64/libexpat.so.1 lib64expat1: /usr/lib64/libexpat.so.1.6.0 lib64expat1-dev: /usr/lib64/libexpat.so libexpat1: /lib/i386-linux-gnu/libexpat.so.1 libexpat1: /lib/i386-linux-gnu/libexpat.so.1.6.0 libexpat1-dev: /usr/lib/i386-linux-gnu/libexpat.so 

I already tried to create a symbolic link

 sudo ln -s /usr/lib/i386-linux-gnu/libexpat.so /usr/lib/i386-linux-gnu/libexpat.so.0 

but it didn’t work. Strange thing:

  ls -l `locate libexpat.so` ls: cannot access /lib/i386-linux-gnu/libexpat.so.1: No such file or directory ls: cannot access /lib/i386-linux-gnu/libexpat.so.1.6.0: No such file or directory ls: cannot access /usr/lib/vmware-vix-disklib/lib64/libexpat.so.0: No such file or directory -rw-r--r-- 1 ubuntu ubuntu 141320 Aug 20 09:21 /home/ubuntu/vddk/lib64/libexpat.so.0 -rw-r--r-- 1 root root 141320 Feb 3 16:45 /usr/lib/vmware-vix-disk-lib/vmware-vix-disk-lib/lib64/libexpat.so.0 -rw-r--r-- 1 root root 141320 Aug 20 09:21 /usr/vmware-vix-disklib-distrib/lib64/libexpat.so.0 
+7
c ++ linux shared-libraries
source share
3 answers

The manual download and installation of the libexpat package form is fixed here http://expat.sourceforge.net/ and find the download page. This should lead you to the sourceforge page and choose a stable package.

0
source share

apt-file shows only the contents of the package or, in your case, the package by file name, but it works regardless of whether the package is installed or not.

You need to install libexpat1 :

 sudo apt-get install libexpat1 

If you intend to compile and link your own C programs with libexpat1 , you will also need:

 sudo apt-get install libexpat1-dev 
+5
source share

Go to the download source page and build with the correct flag.

Since you are creating for x86, you need to run configure as follows:

 ./configure CFLAGS=-m32 
0
source share

All Articles