I have been trying to install php driver for mongodb on Ubuntu Linux 14.04 LTS. Tried to install as follows :

sudo pecl install mongodb output is No releases available for package "pecl.php.net/mongodb"

Also i tried to install the legacy version

sudo pecl install mongo output is No releases available for package "pecl.php.net/mongo"

So, i downloaded the latest package for mogodb php driver from "pecl.php.net/package/mongodb"

mongodb-1.1.2.tgz

Placed it on linux file system and tried installing as below.

sudo pecl install mongodb-1.1.2.tgz

output is could not extract the package.xml file from "mongodb-1.1.2.tgz" install failed

So, i extracted the package using command tar -xvzf mongodb-1.1.2.tgz

I am able to see the package.xml there.

I copied package.xml to the directory mongodb-1.1.2 and tried intalling mongodb by passing the package.xml directly as below

sudo pecl install package.xml

This is the output:

    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

Tried to install php5-dev as below:

sudo apt-get install php5-dev

output is as below:

The following packages have unmet dependencies:

 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.

Any help/guidance is appreciated. Thanks.

migrated from stackoverflow.com Jan 12 '16 at 21:16

This question came from our site for professional and enthusiast programmers.

  • why are your first couple error samples saying "mogo"? Is that a typo here, or didyou really type "mogo" and fix the command sample but leave the error message intact? – Marc B Jan 12 '16 at 18:51
  • @MarcB, yes it's a typo it should be mongo – Mahesh Jan 12 '16 at 18:55

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.