PHP5.5.7 compiling in MAC: configure: error: freetype. hnotfoun

Source: Internet
Author: User
When you execute configura, the following message is displayed: configure: error: freetype. hnotfound. freetype is installed using brew. You can also query this file stk-tianwen: freetype2hufeiyan $ lsusrlocal1_defreetype2freetype. husrlocal1_defreetype2freetype. hstk-tianwen.

When you execute configura, the following message is displayed: configure: error: freetype. h not found. freetype is installed using brew. You can also query this file stk-tianwen: freetype2 hufeiyan $ ls/usr/local/include/freetype2/freetype. h/usr/local/include/freetype2/freetype. h stk-tianwen

Prompt when configura is executed

Configure: error: freetype. h not found.

Freetype is installed using brew. You can also query this file.

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

After a long time, it was impossible.

Then I searched for the configuration file.

Stk-tianwen: php-5.5.7 hufeiyan $ cat configure | grep freetype. h
If test-f "$ I/include/freetype2/freetype. h"; then
As_fn_error $? "Freetype. h not found." "$ LINENO" 5
If test-f "$ I/include/freetype2/freetype. h"; then
As_fn_error $? "Freetype. h not found." "$ LINENO" 5
Stk-tianwen: php-5.5.7 hufeiyan $

Their paths are different. After brew is installed, the header file path is/usr/local/include/freetype2/, and the path required by PHP is/include/freetype2/freetype/

PHP considers/usr/local/include/freetype2/to have a freetype directory.


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.


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 --- 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 /ipvs93.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.