pecl安装mongodb
来源:互联网 发布:恶灵附身2优化这么样 编辑:程序博客网 时间:2024/06/05 19:45
今天着实又运维了一把,有台测试环境的机器php不完整,结果在使用pecl install mongodb的时候爆出了一大堆问题,花了将近一天时间才解决。过程中遇到的问题现象和解决方法整理如下:
1、pecl install mongodb提示:
Warning: Invalid argument supplied for foreach() in Command.php on line 259
Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259
...etc etc etc...等一大堆错误
解决方案:vi `which pecl`去掉-n
参考:http://serverfault.com/questions/589877/pecl-command-produces-long-list-of-errors
之后提示:
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed
解决方案:安装php-devel
参考:http://wangzq-phper.iteye.com/blog/2297792
2、yum install php-devel
提示:
Error: Package: pcre-devel-8.32-12.el7.x86_64 (core-0)
Requires: pcre(x86-64) = 8.32-12.el7
Installed: pcre-8.32-15.el7_2.1.x86_64 (@updates)
pcre(x86-64) = 8.32-15.el7_2.1
Available: pcre-8.32-12.el7.x86_64 (core-0)
pcre(x86-64) = 8.32-12.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
解决方案:pcre降级
3、yum downgrade pcre
4、yum install php-devel
5、pecl install mongodb
提示:
configure: error: in `/tmp/pear/install/pear-build-rootUhyP0B/mongodb-1.2.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
ERROR: `/tmp/pear/install/mongodb/configure --with-php-config=/usr/bin/php-config' failed
解决方案:yum install gcc
6、yum install gcc
提示:
Error: Package: glibc-2.17-55.el7.x86_64 (core-0)
Requires: glibc-common = 2.17-55.el7
Installed: glibc-common-2.17-106.el7_2.8.x86_64 (@updates)
glibc-common = 2.17-106.el7_2.8
Available: glibc-common-2.17-55.el7.x86_64 (core-0)
glibc-common = 2.17-55.el7
Error: Package: glibc-common-2.17-106.el7_2.8.x86_64 (@updates)
Requires: glibc = 2.17-106.el7_2.8
Removing: glibc-2.17-106.el7_2.8.x86_64 (@updates)
glibc = 2.17-106.el7_2.8
Downgraded By: glibc-2.17-55.el7.x86_64 (core-0)
glibc = 2.17-55.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
解决方案:降级yum downgrade glibc glibc-common(注意:这两个软件互相依赖,每次只降级一个会报错)
7、yum downgrade glibc glibc-common
8、yum install gcc
9、pecl install mongodb
提示:
configure: error: Cannot find OpenSSL's <evp.h>
ERROR: `/tmp/pear/install/mongodb/configure --with-php-config=/usr/bin/php-config' failed
解决方案:yum install openssl-devel
10、yum install openssl-devel
这里遇到了各种软件版本不一致,最终使用降级命令解决yum downgrade。有的时候只需要降级一个软件,有的时候需要同时降级多个软件
11、pecl install mongodb
终于成功了
1 0
- pecl安装mongodb
- PECL方式安装php-mongodb扩展
- pecl安装
- pecl 下安装软件
- php如何安装PECL
- centos安装pecl
- PECL源码编译安装
- mac 安装 pecl
- linux安装pecl、pear
- centos安装pecl
- pecl安装扩展
- php的pecl命令安装 mongodb模块的报错解决办法
- PHP扩展安装之PECL
- PECL轻松安装PHP扩展
- PECL的安装和使用
- MAC OS X 安装 pecl
- 在Mac上安装pecl
- PECL
- WeX5学习笔记之调用后端服务
- web前端之了解node一:node的介绍及安装配置
- 随机森林算法的简单总结及python实现
- Android Bugly 热修复 快速接入
- 数据结构与算法入门(1)--基本概念
- pecl安装mongodb
- 在Linux环境下搭建基于Nginx的rtmp服务器
- Unity3D的UGUI——Canvas
- gdb调试多线程出现的死锁
- 百度地图删除圆形或线形的覆盖物
- IAP & ICP
- vim 设置自动生成文件头
- Android关于Dex拆分(MultiDex)技术详解
- openwrt移植到tiny210编译出现的问题