/usr/lib/libexpat.so: could not read symbols: File in wrong format

Tuesday, February 3, 2009

I was trying to compile Apache in CentOS 4.2, 64 bit machine and the "make" command failed with the error message - /usr/lib/libexpat.so: could not read symbols: File in wrong format.

The problem was the /usr/lib/libexpat.so was meant for 32 bit machines and my machine was 64 bit. The correct libexpat.so was present in /usr/lib64/libexpat.so. So I backed up the /usr/lib/libexpat.so and created a symbolic link to point to the 64 bit libexpat.so -

ln -s /usr/lib64/libexpat.so /usr/lib/libexpat.so

That did the trick.

0 comments: