关于Mac安装PHP相关扩展出现Zend/zend_config.h缺失的问题记录
2017-01-16 16:14
876 查看
Mac升级之后,系统自带的php版本也会随之升级,我用的就是系统自带的版本
麻烦的是扩展在版本变更后需要重新编译安装
重新安装redis xdebug 等扩展时却会遇到各种头文件缺失的问题
之前从php官网下载php源码包解压之后,放到提示缺失文件的目录中,就可以解决这个问题。
后来也有自己重新编译覆盖安装过PHP,不过感觉都比较繁琐,...
常见的错误提示如下(redis)
In file included from /usr/include/php/main/php.h:35:
/usr/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found
# include <zend_config.h>
^
1 error generated.
make: *** [redis.lo] Error 1
网上搜索之后,从各种参考资源中发现了这个,感觉可以试试
I finally managed to install xdebug. In fact, I had to install Xcode developer tool and then copy the files from
于是在Xcode对应的目录看了看,确实有类似的目录存在。
拷贝至相应的目录后,编译安装通过。 仅以此备忘。
友情提示: 注意观察错误提示, 参考的资料与自己的情况通常都有差距,举一反三很重要 :)
麻烦的是扩展在版本变更后需要重新编译安装
重新安装redis xdebug 等扩展时却会遇到各种头文件缺失的问题
之前从php官网下载php源码包解压之后,放到提示缺失文件的目录中,就可以解决这个问题。
后来也有自己重新编译覆盖安装过PHP,不过感觉都比较繁琐,...
常见的错误提示如下(redis)
In file included from /usr/include/php/main/php.h:35:
/usr/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found
# include <zend_config.h>
^
1 error generated.
make: *** [redis.lo] Error 1
网上搜索之后,从各种参考资源中发现了这个,感觉可以试试
I finally managed to install xdebug. In fact, I had to install Xcode developer tool and then copy the files from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/php into /Applications/MAMP/bin/php/php5.4.4/includeand then it worked !
于是在Xcode对应的目录看了看,确实有类似的目录存在。
拷贝至相应的目录后,编译安装通过。 仅以此备忘。
友情提示: 注意观察错误提示, 参考的资料与自己的情况通常都有差距,举一反三很重要 :)
相关文章推荐
- 升级mac中的系统之后,给PHP安装扩展常出现问题
- ubuntu安装 laravel 过程中出现: mcrypt php extension required 的问题 | 以及composer相关问题 | Nginx安装
- 解决windows下Composer因php_openssl扩展缺失而安装失败的问题
- PHP7 学习笔记(三)关于PHP7如何安装调试工具Xdebug扩展以及Zephir的问题
- 关于PHP5.3.x和Zend Optimizer(Zend Guard Loader),以及shopex4.8.5安装的问题
- 安装php7及安装memcache扩展出现的新旧php版本兼容扩展的问题
- mac下php扩展mcrypt无法安装问题
- mac 中安装redis 以及 安装php-redis扩展过程详细记录
- 解决windows下Composer因php_openssl扩展缺失而安装失败的问题
- php扩展模块安装出现问题
- 在ubuntu14.14 安装php扩展扩展出现的问题
- 关于mac x lion安装xcode出现错误的问题
- 关于PHP5.3.x和Zend Optimizer(Zend Guard Loader),以及shopex4.8.5安装的问题
- mac安装lnmp环境中php扩展遇到的问题
- 关于微店整合微信支付时出现的的各种问题的记录 php版
- 关于ubuntu 命令update-alternatives --config java 安装jdk出现不能选择版本问题!
- 解决windows下Composer因php_openssl扩展缺失而安装失败的问题
- Mac系统升级到10.9(mavericks)时安装php扩展问题解决
- 关于liunx下yum安装mysql+apache+php+phpmyadmin出现的问题
- mac安装php的oracle扩展oci8的一些问题