无法在 Ubuntu 14.04 LTS 上安装 php mongodb 驱动程序

无法在 Ubuntu 14.04 LTS 上安装 php mongodb 驱动程序

我一直在尝试在 Ubuntu Linux 14.04 LTS 上安装 mongodb 的 php 驱动程序。尝试按如下方式安装:

sudo pecl install mongodb 输出是No releases available for package "pecl.php.net/mongodb"

我也尝试安装旧版本

sudo pecl install mongo 输出是No releases available for package "pecl.php.net/mongo"

因此,我从“pecl.php.net/package/mongodb”下载了 mogodb php 驱动程序的最新包

mongodb-1.1.2.tgz

将其放在 Linux 文件系统上并尝试按如下方式安装。

sudo pecl install mongodb-1.1.2.tgz

输出是could not extract the package.xml file from "mongodb-1.1.2.tgz" install failed

因此,我使用命令提取了包tar -xvzf mongodb-1.1.2.tgz

我能看到package.xml那里。

我复制package.xml到目录mongodb-1.1.2并尝试通过直接传递 package.xml 来安装 mongodb,如下所示

sudo pecl install package.xml

这是输出:

    349 source files, building
running: phpize
sh: 1: phpize: not found
If the command failed with 'phpize: not found' then you need to install php5-dev packageYou can do it by running 'apt-get install php5-dev' as a root userERROR: `phpize' failed

尝试按照如下方式安装 php5-dev:

sudo apt-get install php5-dev

输出如下:

以下软件包具有未满足的依赖关系:

 php5 : Depends: libapache2-mod-php5 (>= 5.3.10-1ubuntu3.18) but it is not going to be installed or
                 libapache2-mod-php5filter (>= 5.3.10-1ubuntu3.18) but it is not going to be installed or
                 php5-cgi (>= 5.3.10-1ubuntu3.18) but it is not going to be installed or
                 php5-fpm (>= 5.3.10-1ubuntu3.18) but it is not going to be installed
        Depends: php5-common (>= 5.3.10-1ubuntu3.18) but it is not going to be installed
 php5-dev : Depends: libssl-dev but it is not going to be installed
            Depends: libtool (>= 2.2)
            Depends: php5-common (>= 5.3.10-1ubuntu3.18) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

任何帮助/指导都值得感激。谢谢。

相关内容