登录
首页 >  文章 >  php教程

Mac系统PHP7.4安装失败提示libxml2 not found怎么办?

时间:2024-12-10 21:40:05 220浏览 收藏

有志者,事竟成!如果你在学习文章,那么本文《Mac系统PHP7.4安装失败提示libxml2 not found怎么办?》,就很适合你!文章讲解的知识点主要包括,若是你对本文感兴趣,或者是想搞懂其中某个知识点,就请你继续往下看吧~

Mac系统PHP7.4安装失败提示libxml2 not found怎么办?

libxml2 安装报错

在 mac 系统安装 php74 时,提示 libxml2 not found。下载 2.9 版本的 libxml 编译包后,发现 make 时出现以下错误:

ld: cannot link directly with dylib/framework, your binary is not an allowed client of /library/developer/commandlinetools/sdks/macosx12.1.sdk/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/config/libpython2.7.tbd for architecture x86_64

这个错误提示表明,正在编译的二进制文件并不是允许客户端的 python 框架版本,因此无法直接链接。

建议解决方案:

由于直接编译需要一定的专业知识,建议使用 homebrew 包管理工具直接安装 libxml2,这样可以更省事,减少出错的可能性。以下是在终端中使用 homebrew 安装 libxml2 的命令:

brew install libxml2

今天关于《Mac系统PHP7.4安装失败提示libxml2 not found怎么办?》的内容就介绍到这里了,是不是学起来一目了然!想要了解更多关于的内容请关注golang学习网公众号!

相关阅读
更多>
最新阅读
更多>
课程推荐
更多>