CentOS 5 64-bit: "configure: error: ZLIB extension requires zlib >= 1.0.9" or "/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm"
If you're using CentOS 5 64-bit and get this error after running "./build php n":configure: error: ZLIB extension requires zlib >= 1.0.9Check the php config.log to see why, eg: tail php-5.2.6/config.logIf you get any of the following type of messages: /usr/bin/ld: skipping incompatible /usr/lib/somelib.so when searching for -lsomelibit means that you have both 32-bit and 64-bit libraries. The configure script in php is finding the 32-bit versions, which don't work with your system. As to why your system has 32-bit versions that don't work is beyond me at this time. New solution, use the --with-libdir=lib64, eg in the configure/ap2/configure.php5:
--with-iconv \
--with-iconv-dir=/usr/local/lib \
--with-libdir=lib64and take out the line:--with-iconv=/usr/local \ Another solution, probably the "cleanest" solution (reported, but untested by us) yum remove \*.i\?86 old solution (not pretty): Here are some of the occurances we've seen, along with what we've typed out to repair it. Keep in mind, if you're going to attempt to run any of these forced re-links.. be *Positive* that the 64-bit version of the library exists, as pointed to in the path first path of the command. If you link to a file that doesn't exist, your entire system may grind to a halt. #/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.so when searching for -lgssapi_krb5 #/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.a when searching for -lgssapi_krb5 ln -sf /usr/lib64/libgssapi_krb5.so.2.2 /usr/lib/libgssapi_krb5.so #/usr/bin/ld: skipping incompatible /usr/lib/libkrb5.so when searching for -lkrb5 #/usr/bin/ld: skipping incompatible /usr/lib/libkrb5.a when searching for -lkrb5 ln -sf /usr/lib64/libkrb5.so.3.3 /usr/lib/libkrb5.so #/usr/bin/ld: skipping incompatible /usr/lib/libk5crypto.so when searching for -lk5crypto #/usr/bin/ld: skipping incompatible /usr/lib/libk5crypto.a when searching for -lk5crypto ln -sf /usr/lib64/libk5crypto.so.3.1 /usr/lib/libk5crypto.so #/usr/bin/ld: skipping incompatible /usr/lib/libcom_err.so when searching for -lcom_err #/usr/bin/ld: skipping incompatible /usr/lib/libcom_err.a when searching for -lcom_err ln -sf /lib64/libcom_err.so.2 /usr/lib/libcom_err.so #/usr/bin/ld: skipping incompatible /usr/lib/libgcrypt.so when searching for -lgcrypt #/usr/bin/ld: skipping incompatible /usr/lib/libgcrypt.a when searching for -lgcrypt ln -sf /usr/lib64/libgcrypt.so.11 /usr/lib/libgcrypt.so /usr/bin/ld: skipping incompatible /usr/lib/libgpg-error.so when searching for -lgpg-error /usr/bin/ld: skipping incompatible /usr/lib/libgpg-error.a when searching for -lgpg-error ln -sf /usr/lib64/libgpg-error.so.0 /usr/lib/libgpg-error.so #others tha may also apply.. only run each one if you see the related error in your config.log ln -sf /usr/lib64/libexpat.so /usr/lib/libexpat.so ln -sf /usr/lib64/libm.so /usr/lib/libm.so ln -sf /usr/lib64/libssl.so /usr/lib/libssl.so ln -sf /usr/lib64/libgssapi_krb5.so.2.2 /usr/lib/libgssapi_krb5.so ln -sf /usr/lib64/libkrb5.so.3.3 /usr/lib/libkrb5.so ln -sf /usr/lib64/libk5crypto.so.3.1 /usr/lib/libk5crypto.so ln -sf /lib64/libcom_err.so.2 /usr/lib/libcom_err.so ln -sf /usr/lib64/libgcrypt.so.11 /usr/lib/libgcrypt.so ln -sf /usr/lib64/libgpg-error.so.0 /usr/lib/libgpg-error.so |
Also Read