Monday, November 15, 2021

[SOLVED] How to install PIL in Fedora 17 x86_64?

Issue

I am installing PIL in my Fedora 17

But when I set up it, I got two Errors below:

/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../libz.so when searching for -lz
/bin/ld: skipping incompatible /lib/libz.so when searching for -lz
/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/bin/ld: cannot find -lz
/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I have checked my gcc and python-devel, and they are both up to date. Some said that it might be something to do with my x86_64 lib, so I tried to install lib32z-devel, but I couldn't yum install it.

Can any body help? Thanks in advance!


Solution

You need to install zlib-devel in order to be able to link against zlib.

Having said that, unless you have a particular reason for building PIL from source I would recommend just installing python-imaging with yum like this:

sudo yum install -y python-imaging


Answered By - TomH