配置 php 5.3 失败并显示错误:未找到 freetype.h(但已安装 libfreetype6-dev)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26342868/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Configure php 5.3 fail with error : freetype.h not found (but libfreetype6-dev is installed)
提问by suther
I have configured php with the following command:
我已经使用以下命令配置了 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
But if I try to compile, I got the Error-Message:
但是,如果我尝试编译,则会收到错误消息:
configure: error: freetype.h not found
配置:错误:找不到freetype.h
回答by suther
If you got that message, even if you installed libfreetype6-dev, then try this:
如果您收到该消息,即使您安装了libfreetype6-dev,也请尝试以下操作:
mkdir /usr/include/freetype2/freetype
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
After this, do .configure again.
在此之后,再次执行 .configure。
Additional hint: For some Systems you have to use /usr/local/include....
附加提示:对于某些系统,您必须使用 /usr/ local/include....