我试图在运行Ubuntu 12.04的Rackspace云服务器上安装PHP 5.3.21,但是在configuration过程中我仍然遇到错误。 它不断给我以下错误:
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
这是我的PHPconfiguration脚本:
./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=/lib/x86_64-linux-gnu --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 --with-freetype-dir --with-t1lib --enable-gd-native-ttf --with-gettext --with-gmp --with-imap=/usr/local/c-client-2007f --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
以下是我之前安装的软件包:
apt-get -y install php5-dev php-pear php5-imap apt-get -y install libxml2-dev libevent-dev zlib1g-dev libbz2-dev libgmp3-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libxpm-dev libgd2-xpm-dev libmcrypt-dev memcached libmemcached-dev libpcre3-dev libc-client-dev libkrb5-dev libsasl2-dev libmysqlclient-dev libpspell-dev libsnmp-dev libtidy-dev libxslt-dev libtool libc-client2007e libc-client2007e-dev apt-get -y build-dep t1lib printf "\n" | apt-get -y install t1lib-bin libt1-dev
我也尝试使用以下方法从源安装C-Client IMAP:
wget ftp://ftp.cac.washington.edu/imap/c-client.tar.Z tar -xvf c-client.tar.Z cd imap-2007f make clean make ldb EXTRAAUTHENTICATORS=gss PASSWDTYPE=gss IP6=4 cp c-client/c-client.a c-client/libc-client.a mkdir -p /usr/local/c-client-2007f/lib mkdir -p /usr/local/c-client-2007f/include cp c-client/*.h /usr/local/c-client-2007f/include cp c-client/*.a /usr/local/c-client-2007f/lib cd ..
但我仍然得到错误。
我很感激任何帮助,使我解决这个问题。
谢谢。
我设法解决这个问题。
我在这里发布我的答案: https : //askubuntu.com/questions/258394/error-installing-php-5-3-21-on-ubuntu-12-04
干杯。
尝试运行sudo apt-get install build-essential 。 这应该安装任何你需要build立的缺失的lib。
$ apt-file search libc-client.a libc-client2007e-dev: /usr/lib/libc-client.a
所以你应该安装libc-client2007e-dev (或类似的)和apt-file ,以便下次能search自己=)
$ apt-cache show apt-file blah... Description: search for files within Debian packages (command-line interface) apt-file is a command line tool for searching files contained in packages for the APT packaging system. You can search in which package a file is included or list the contents of a package without installing or fetching it. blah...
最后:
sudo apt-get install libc-client2007e-dev apt-file
但是你有没有检查你不能通过apt-get安装php?
试试:
apt-cache policy php5
在系统中查看不同的版本(您可以添加一些存储库)
我遇到了这个问题,最终偶然发现了一个给我解决问题的网站 :
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a