Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to compile PHP 5.3.21 on Ubuntu 11.04. I keep getting the following error:

configure: error: libXpm.(a|so) not found.

I searched for the location for libXpm.a and libXpm.so and both of them are in /usr/lib. So I then update --with-xpm-dir to --with-xpm-dir=/usr/lib in my configure script, but I still get the same error. I've also installed libxpm-dev and a host of other dependent libraries, but still I get the error.

Below is the entire configure script:

./configure --enable-fpm --enable-cli --with-fpm-user=phpfpm --with-fpm-group=phpfpm --prefix=/usr/local/php --exec-prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/etc/conf.d --with-libdir --enable-bcmath --enable-ctype --with-curl --with-curlwrappers --with-pear --enable-dba --with-cdb --enable-exif --enable-ftp --disable-fileinfo --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir=/usr/lib --with-freetype-dir --with-t1lib --enable-gd-native-ttf --with-gettext --with-gmp --with-imap --with-imap-ssl --with-ldap --with-ldap-sasl --enable-mbstring=all --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-pdo-mysql --enable-sqlite-utf8 --with-openssl --with-kerberos --with-pspell --enable-shmop --enable-simplexml --with-snmp --enable-soap --enable-sockets --with-tidy --enable-wddx --enable-xmlreader --with-xmlrpc --with-xsl --enable-zip --with-zlib --enable-sysvsem --enable-sysvshm

I'd really appreciate some assistance.

Thanks.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I was able to solve this by changing the settings of the specific configure options below:

--with-libdir=lib --with-xpm-dir=/usr

This ensured that /usr/lib would one of the main locations that would be searched for required files.

It worked ok after this.

share|improve this answer
    
it worked on CentOS 6.2 as well –  user176967 Jun 7 '13 at 11:31
    
this doesn't always work, many times you need to symlink, more here: bugs.php.net/bug.php?id=65016 –  Evan Jan 7 at 9:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.