配置PHP5.3失败,错误为:找不到freetype.h(但已安装libfreetype6 dev)
我已使用以下命令配置了php:配置PHP5.3失败,错误为:找不到freetype.h(但已安装libfreetype6 dev),php,compiler-errors,Php,Compiler Errors,我已使用以下命令配置了php: ./configure \ --prefix=/opt/phpfcgi-5.3.28 \ --with-pdo-pgsql \ --with-zlib-dir \ --with-freetype-dir=/usr/include/freetype2 \ --with-libpng-dir=/usr/include/libpng \ --with-xpm-dir=/usr \ --enable-mbstring \ls \ --with-libxml-dir=/us
./configure \
--prefix=/opt/phpfcgi-5.3.28 \
--with-pdo-pgsql \
--with-zlib-dir \
--with-freetype-dir=/usr/include/freetype2 \
--with-libpng-dir=/usr/include/libpng \
--with-xpm-dir=/usr \
--enable-mbstring \ls \
--with-libxml-dir=/usr \
--enable-soap \
--enable-calendar \
--with-curl \
--with-mcrypt \
--with-zlib \
--with-gd \
--with-pgsql \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-zlib \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-mysql \
--with-mysql-dir=/etc/mysql/ \
--with-pdo-mysql \
--with-mysqli \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--with-openssl \
--with-libdir=/lib/x86_64-linux-gnu \
--enable-ftp \
--with-kerberos \
--with-gettext \
--enable-cgi \
--with-fpm-user=www-data \
--with-fpm-group=www-data
但如果我尝试编译,我会收到错误消息:
配置:错误:找不到freetype.h
如果您收到该消息,即使您安装了libfreetype6 dev,请尝试以下操作:
mkdir /usr/include/freetype2/freetype
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
在此之后,重新进行配置
附加提示:对于某些系统,您必须使用/usr/local/include….也可以查看错误报告,这对我在Debian Jessie上编译PHP5.1很有用。一个遗留项目不可能完成的任务。谢谢。在Alpine Linux上是
freetype dev