Compiler PHP5.5.7 problem under Mac: Configure:error:freetype.h not found.____php

Source: Internet
Author: User
Tags mcrypt

Prompt when executing Configura

Configure:error:freetype.h not found.

FreeType was installed using brew. You can also query to this file

Stk-tianwen:freetype2 hufeiyan$ ls/usr/local/include/freetype2/freetype.h
/usr/local/include/freetype2/freetype.h
Stk-tianwen:freetype2 hufeiyan$

It's not going to get through.

And then I thought I'd search for a configuration file

stk-tianwen:php-5.5.7 hufeiyan$ Cat Configure |grep freetype.h
If Test-f "$i/include/freetype2/freetype/freetype.h"; Then
As_fn_error $? "Freetype.h not found." "$LINENO" 5
If Test-f "$i/include/freetype2/freetype/freetype.h"; Then
As_fn_error $? "Freetype.h not found." "$LINENO" 5
stk-tianwen:php-5.5.7 hufeiyan$

Originally their path processing is different, the brew installs the rear file path for/usr/local/include/freetype2/,php required path is/include/freetype2/freetype/

PHP thinks there's a freetype directory underneath/usr/local/include/freetype2/.


Execute command

Ln-s/usr/local/cellar/freetype/2.5.2/include/freetype2//usr/local/cellar/freetype/2.5.2/include/freetype2/ FreeType

After creating a link, the configuration passes.


Final Configuration Successful command:

./configure--with-apxs2=/usr/local/apache2/bin/apxs--with-freetype-dir=/usr/local/opt/freetype-- with-libxml-dir=/usr/local/opt/libxml2/--with-png-dir=/usr/local/opt/libpng/--with-jpeg-dir=/usr/local/opt/ JPEG--with-gd=/usr/local/--with-zlib-dir=/usr/local/zlib/--with-mcrypt=/usr/local/opt/mcrypt/--with-mysql=/usr /local/mysql--enable-soap--enable-mbstring=all--enable-pdo--with-pdo-mysql=/usr/local/mysql--with-pgsql=/ Applications/postgres93.app/contents/macos--enable-opcache=no

I don't know who is wrong.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.