php - 配置 php 5.3 失败,错误为 : freetype. h 未找到(但已安装 libfreetype6-dev)

标签 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=/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/

相关文章:

javascript - Plupload:如何直接从相机上传(在移动设备上)

php - 在数据库中插入数据时出现问题

使用直接大括号初始化时c++编译错误 'expected ' ;' at end of declaration'

compiler-errors - 使用 Eclipse Android 编译 FFMPEG

android - gradle 4.4 升级后找不到 manifest-merger.jar (com.android.tools.build :manifest-merger:26. 1.2) 错误

php - PHP错误: Undefined offset error within foreach loop

php - "isset"函数的使用

php - Laravel - 你在哪里存储自己的界面?

php - 在奇数单击和偶数单击链接时创建不同的功能

java - BlueJ错误 “'无效类型“此处不允许”