【问题标题】:Configure php 5.3 fail with error : freetype.h not found (but libfreetype6-dev is installed)配置 php 5.3 失败并出现错误:找不到 freetype.h(但已安装 libfreetype6-dev)
【发布时间】:2014-10-13 14:52:46
【问题描述】:

我已经使用以下命令配置了 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

但如果我尝试编译,我会收到错误消息:

配置:错误:找不到freetype.h

【问题讨论】:

标签: php compiler-errors


【解决方案1】:

如果您收到该消息,即使您安装了 libfreetype6-dev,请尝试以下操作:

mkdir /usr/include/freetype2/freetype
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h

在此之后,再次进行.configure。

附加提示:对于某些系统,您必须使用 /usr/local/include....

【讨论】:

  • 在 Debian Jessie 上编译 PHP 5.1 时,这对我有用。遗留项目不可能完成的任务。谢谢。
  • 在 Alpine Linux 上是freetype-dev
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-08-28
  • 1970-01-01
  • 2012-10-15
  • 1970-01-01
  • 2021-07-31
  • 1970-01-01
  • 2016-11-08
相关资源
最近更新 更多