当前位置: 首页 > news >正文

宝塔安装mongodb插件失败的解决办法

安装时始终不成功。

进入控制台进行安装

/www/server/php/71# pecl install mongodb
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
pecl/mongodb requires PHP (version >= 7.2.0, version <= 8.99.99), installed version is 7.1.33
No valid packages found
install failed

安装72版本再安装 

/www/server/php/72# pecl install mongodb
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update

Warning: popen() has been disabled for security reasons in OS/Guess.php on line 254
PHP Warning:  popen() has been disabled for security reasons in /www/server/php/72/lib/php/OS/Guess.php on line 254

Warning: popen() has been disabled for security reasons in /www/server/php/72/lib/php/OS/Guess.php on line 254

Warning: fgets() expects parameter 1 to be resource, null given in OS/Guess.php on line 255
PHP Warning:  fgets() expects parameter 1 to be resource, null given in /www/server/php/72/lib/php/OS/Guess.php on line 255

Warning: fgets() expects parameter 1 to be resource, null given in /www/server/php/72/lib/php/OS/Guess.php on line 255

Warning: pclose() expects parameter 1 to be resource, null given in OS/Guess.php on line 264
PHP Warning:  pclose() expects parameter 1 to be resource, null given in /www/server/php/72/lib/php/OS/Guess.php on line 264

Warning: pclose() expects parameter 1 to be resource, null given in /www/server/php/72/lib/php/OS/Guess.php on line 264
downloading mongodb-1.16.2.tgz ...
Starting to download mongodb-1.16.2.tgz (1,907,341 bytes)
........................................................................................................................................................................................................................................................................................................................................................................................done: 1,907,341 bytes
831 source files, building

Warning: putenv() has been disabled for security reasons in PEAR/Builder.php on line 367
PHP Warning:  putenv() has been disabled for security reasons in /www/server/php/72/lib/php/PEAR/Builder.php on line 367

Warning: putenv() has been disabled for security reasons in /www/server/php/72/lib/php/PEAR/Builder.php on line 367
running: phpize

Warning: popen() has been disabled for security reasons in PEAR/Builder.php on line 525
PHP Warning:  popen() has been disabled for security reasons in /www/server/php/72/lib/php/PEAR/Builder.php on line 525

Warning: popen() has been disabled for security reasons in /www/server/php/72/lib/php/PEAR/Builder.php on line 525
ERROR: failed to run `phpize'

我找到了解决方案:它对我有用。

百度一下,说是在php.ini里将popen函数禁用了
  于是到宝塔界面修改取消禁止popen函数。

checking target system type... x86_64-pc-linux-gnu
configure: error: Cannot find php-config. Please use --with-php-config=PATH
ERROR: `/tmp/pear/temp/mongodb/configure' failed

依然报错

执行以下命令ubuntu系统下的,以为centos不行,换成了ubuntu系统

apt-get install php-pear php-dev libssl-dev pkg-config

再执行命令

pecl install mongodb

成功

Build process completed successfully
Installing '/usr/lib/php/20170718/mongodb.so'
install ok: channel://pecl.php.net/mongodb-1.16.2
Extension mongodb enabled in php.ini

配置php.ini

默认的不行,它加了引号,删除默认添加的改为以下命令,php最少到7.2

正确应该是

extension=/usr/lib/php/20170718/mongodb.so

http://www.lryc.cn/news/213773.html

相关文章:

  • CVE-2018-8174 IE浏览器远程代码执行漏洞
  • 用前端框架Bootstrap和Django实现用户注册页面
  • MySQL用户管理和授权
  • PCIe 的 MSI 中断详解,寄存器级别的详细流程分析,完全搞懂硬件的工作流程
  • 软考 系统架构设计师系列知识点之净室软件工程(1)
  • NFC芯片MS520:非接触式读卡器 IC
  • git push 部分 commit
  • idea自动编译以及修改代码后需要执行 mvn clean install 才生效
  • 21.13 Python 实现端口流量转发
  • CNN卷积神经网络模型的GPU显存占用分析
  • LSF 概览——了解 LSF 是如何满足您的作业要求,并找到最佳资源来运行该作业的
  • 三.RocketMQ单机安装及集群搭建
  • uniapp 模仿 Android的Menu菜单栏
  • wordcloud Python中的词云库
  • 直播间讨论区需要WebSocket,简单了解下
  • 2024年天津高职升本科考试将于11月开始报名
  • linux mysql 创建数据库并配置用户远程管理
  • pppoe拨号案例
  • 基于STM32C8T6的智能蓝牙小车控制设计
  • P3983 赛斯石(赛后强化版),背包
  • 系统架构设计师历年真题案例知识点汇总
  • 缓存击穿只会逻辑过期 OR 互斥锁?深入思考 == 鹤立鸡群
  • 从 Seq2Seq 到 Attention:彻底改变序列建模
  • 手机通讯类、ip查询、智能核验、生活常用API接口推荐
  • 1.6 基本安全设计准则
  • 图扑 HT for Web 手机端运维管理系统
  • LiveGBS流媒体平台GB/T28181常见问题-国标级联海康国标级联大华国标级联华为等,配置了国标级联, 上级看不到通道该怎么办?
  • 数字频带传输——二进制数字调制及MATLAB仿真
  • Bitdu 150万美元投资MSG:Web3合作典范催动极致交易体验
  • CentOS一键部署Docker