【问题标题】:Error installing php mongo driver after php5 upgradephp5升级后安装php mongo驱动出错
【发布时间】:2016-05-27 20:57:07
【问题描述】:

我以这种方式将我的 php5 版本从 5.4 升级到 5.6(debian 7.9):

我加了

deb http://packages.dotdeb.org wheezy-php56 all
deb-src http://packages.dotdeb.org wheezy-php56 all

到我的 /etc/apt/source.list 文件,然后:

apt-get update
apt-get install php5

一切正常:

php --version
PHP 5.6.16-1

但我需要升级我的 php mongodb 驱动程序,我收到以下错误:

pecl install mongodb 

331 source files, building
running: phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
building in /tmp/pear/temp/pear-build-rootmStnQj/mongodb-1.0.0
running: /tmp/pear/temp/mongodb/configure --with-php-config=/usr/bin/php-config
[...]
checking for pkg-config... no
configure: error: Cannot find OpenSSL's libraries
ERROR: `/tmp/pear/temp/mongodb/configure --with-php-config=/usr/bin/php-config' failed

我已经安装了 openssl 和 libssl-dev。 有什么想法吗?

【问题讨论】:

标签: mongodb openssl debian


【解决方案1】:

我遇到了同样的问题,下面的命令对我有用。

apt-get install pkg-config

【讨论】:

    【解决方案2】:

    我有同样的错误。我在安装 mongodb 之前安装了以下依赖项

    sudo apt-get install -y autoconf g++ make openssl libssl-dev libcurl4-openssl-dev pkg-config libsasl2-dev libpcre3-dev
    sudo pecl install mongodb
    

    【讨论】:

      猜你喜欢
      • 2022-12-22
      • 1970-01-01
      • 1970-01-01
      • 2017-02-16
      • 1970-01-01
      • 2014-08-21
      • 2012-11-02
      • 2015-07-28
      • 1970-01-01
      相关资源
      最近更新 更多