执行configura时提示 configure: error: freetype.h not found. freetype明明是使用brew安装了的。也可以查询到这个文件 stk-tianwen:freetype2 hufeiyan$ ls /usr/local/include/freetype2/freetype.h /usr/local/include/freetype2/freetype.h stk-tianwen执行configura时提示configure: error: freetype.h not found.
freetype明明是使用brew安装了的。也可以查询到这个文件stk-tianwen:freetype2 hufeiyan$ ls /usr/local/include/freetype2/freetype.h/usr/local/include/freetype2/freetype.hstk-tianwen:freetype2 hufeiyan$搞了半天都通不过。
后来想到搜了一下配置文件立即学习“PHP免费学习笔记(深入)
”;
stk-tianwen:php-5.5.7 hufeiyan$ cat configure |grep freetype.hif test -f "$i/include/freetype2/freetype/freetype.h"; thenas_fn_error $? "freetype.h not found." "$LINENO" 5if test -f "$i/include/freetype2/freetype/freetype.h"; thenas_fn_error $? "freetype.h not found." "$LINENO" 5stk-tianwen:php-5.5.7 hufeiyan$原来他们的路径处理不同,brew安装后头文件路径为/usr/local/include/freetype2/,PHP需要的路径为/include/freetype2/freetype/ PHP认为还要/usr/local/include/freetype2/下面有一个freetype目录通义灵码 Mac版通义灵码 Mac版是阿里云推出的一款AI智能编码助手,深度集成于Xcode、VS Code及JetBrains等主流IDE中。它基于大模型技术,支持行级/函数级实时续写、自然语言生成代码、单元测试生成及智能问答等核心功能。macOS用户可通过插件市场直接安装,开箱即用,旨在辅助开发者高效完成编码任务,提升研发效率。
下载执行命令ln -s /usr/local/Cellar/freetype/2.5.2/include/freetype2/ /usr/local/Cellar/freetype/2.5.2/include/freetype2/freetype创建一个链接后,配置通过。
最终配置成功的命令:
./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也不知道是谁不对。
