phpize 动态添加 PHP 扩展的错误及解决方案
使用phpize 动态添加 PHP 扩展是开发中经常需要做的事情,但是在 macOS 中,首次使用该功能必然会碰到一些错误,本文列出了这些错误的解决方法。
问题一:
执行 phpize 报错如下:
$ phpize grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No:
解决方法:
$ ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include /usr/include
PS:如果 sudo 授权后仍提示没有操作权限,请参考文章 macOS 中的 Rootless 机制 。
问题二:
执行 phpize 报错如下:
$ phpize Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. 解决方法:
先安装 Homebrew :
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
然后安装 autoconf :
$ brew install autoconf
PS:Homebrew 的强大谁用谁知道。关于什么是 Homebrew,以及 Homebrew 的使用,请点击Homebrew传送门。不建议手动安装 autoconf 软件包,因为依赖包太多~~
Recent posts from the php Quickfix site:
PrestaShop 1.7 starts the Symfony journey for the Community
#prestashop, #symfony, #framework, #community Burnout in Tech - Laravel News
#burnout, #technology, #developer New in Symfony 3.2: DX improvements (Symfony Blog)
#symfony, #developer, #experience, #improvement PHP: rfc:security-classification
#rfc, #security, #classification Do you know YAML? | Blog of Leonid Mamchenkov
#yaml, #guide, #specification Red Hat will provide PHP 7.0 for RHEL - Remi's RPM repository - Blog
#redhat, #php7, #rhel, #product, #release Introducing the SensioLabsInsight commit status on GitHub - SensioLabs Insight Blog
更多相关教程请访问 php编程从入门到精通全套视频教程

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

PHP 8.4 带来了多项新功能、安全性改进和性能改进,同时弃用和删除了大量功能。 本指南介绍了如何在 Ubuntu、Debian 或其衍生版本上安装 PHP 8.4 或升级到 PHP 8.4

CakePHP 是 PHP 的开源框架。它的目的是使应用程序的开发、部署和维护变得更加容易。 CakePHP 基于类似 MVC 的架构,功能强大且易于掌握。模型、视图和控制器 gu

Visual Studio Code,也称为 VS Code,是一个免费的源代码编辑器 - 或集成开发环境 (IDE) - 可用于所有主要操作系统。 VS Code 拥有针对多种编程语言的大量扩展,可以轻松编写
