1

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.

2 Answers 2

1

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.

2
  • it worked on CentOS 6.2 as well
    – user176967
    Jun 7, 2013 at 11:31
  • 1
    this doesn't always work, many times you need to symlink, more here: bugs.php.net/bug.php?id=65016
    – Eva
    Jan 7, 2014 at 9:59
0

i solved this by:

ln -s /usr/lib/x86_64-linux-gnu/libXpm.so /usr/lib/
ln -s /usr/lib/x86_64-linux-gnu/libXpm.a /usr/lib/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .