我已经使用以下命令配置了 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=/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
但是如果我尝试编译,我收到错误消息:
configure: error: freetype.h not found
最佳答案
如果您收到该消息,即使您安装了libfreetype6-dev,也请尝试以下操作:
mkdir /usr/include/freetype2/freetype
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
此后,再次进行.configure。
附加提示:对于某些系统,您必须使用/usr/local/include....
关于php - 配置 php 5.3 失败,错误为 : freetype. h 未找到(但已安装 libfreetype6-dev),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26342868/