If configure fails try –with-xpm-dir=错误解决办法

编译安装php时使用的是如下配置

[bash]
./configure –prefix=/usr/local/php
–with-config-file-path=/usr/local/php/etc
–with-mysql=/usr/local/mysql
–with-mysqli=/usr/local/mysql/bin/mysql_config
–with-pdo-mysql=/usr/local/mysql
–with-iconv-dir –with-freetype-dir
–with-jpeg-dir –with-png-dir
–with-zlib –with-libxml-dir=/usr
–enable-xml –enable-discard-path –enable-magic-quotes
–enable-safe-mode –enable-bcmath
–enable-shmop
–enable-sysvsem
–enable-inline-optimization –with-curl
–enable-mbregex –enable-fastcgi
–enable-fpm –enable-force-cgi-redirect
–enable-mbstring –with-mcrypt
–enable-ftp –with-gd
–enable-gd-native-ttf
–with-openssl –with-mhash
–enable-pcntl –enable-sockets
–with-xmlrpc –enable-zip
–enable-soap –without-pear
–with-gettext –with-mime-magic
[/bash]

然后报如下错误

If configure fails try –with-xpm-dir=<DIR>;
configure: error: freetype.h not found.

初步怀疑是系统没有安装freetype导致的,我的系统是debian ,于是我执行

[bash]
apt-get install libfreetype6-dev
[/bash]

重新configure php,结果还是一样报如下错误

configure: error: freetype.h not found.

说明刚刚没有安装上,或者不对

干脆直接卸载掉自己编译一个

[bash]
apt-get remove libfreetype6-dev
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz
tar zxvf freetype-2.4.10.tar.gz
cd freetype-2.4.10/
./configure
sudo make && make install
[/bash]

再次configure配置,成功了!

此条目发表在笔记分类目录,贴了, 标签。将固定链接加入收藏夹。

If configure fails try –with-xpm-dir=错误解决办法》有1条回应

  1. Pingback引用通告: debian7安装lnmp失败解决办法 | php博客

发表评论

电子邮件地址不会被公开。 必填项已用*标注