Code Monkey home page Code Monkey logo

Comments (24)

necromant2005 avatar necromant2005 commented on August 11, 2024 156

I fixed the issue by installing extra libraries, the whole list
sudo apt-get install -y autoconf g++ make openssl libssl-dev libcurl4-openssl-dev
sudo apt-get install -y libcurl4-openssl-dev pkg-config
sudo apt-get install -y libsasl2-dev

from mongo-php-driver.

pocketmax avatar pocketmax commented on August 11, 2024 73

fixed it...

sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev

from mongo-php-driver.

Syrok avatar Syrok commented on August 11, 2024 50

last solution:
sudo apt-get install pkg-config libssl-dev

from mongo-php-driver.

bjori avatar bjori commented on August 11, 2024 10

The configure output said you were missing pkg-config

checking for pkg-config... no

Anyway, glad everything worked out. Let us know if you find any other issues!

from mongo-php-driver.

warrenca avatar warrenca commented on August 11, 2024 8

I'm running in OSX and tried the following commands

$ brew reinstall pkg-config
$ brew link openssl --force
$ sudo pecl install mongodb
....
install ok: channel://pecl.php.net/mongodb-1.1.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongodb.so" to php.ini

from mongo-php-driver.

zhukovra avatar zhukovra commented on August 11, 2024 8

pecl install mongodb successfully builds with pkg-config and libssl-dev packages on Jessie. No additional packages like libcurl4-openssl-dev libcurl4-openssl-dev libsasl2-dev is required.

from mongo-php-driver.

necromant2005 avatar necromant2005 commented on August 11, 2024 7

Ubuntu 16.10
after installing:
sudo apt-get install libssl-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev

sudo pecl install mongodb
configure: error: Cannot find OpenSSL's libraries
ERROR: `/tmp/pear/temp/mongodb/configure' failed

from mongo-php-driver.

bjori avatar bjori commented on August 11, 2024 4

Do you know if you had libbsl-dev installed, or if installing pkg-config fixed it?

Using pkg-config is generally preferable, but the fallback should work -- but you'll need to provide:
--with-openssl-dir=/path/to/openssl

from mongo-php-driver.

pocketmax avatar pocketmax commented on August 11, 2024 4

I already had libssl-dev and pkg-config installed already. After I installed those packages, I did a normal "sudo pecl install mogodb" and it worked without a problem.

from mongo-php-driver.

nmeegama avatar nmeegama commented on August 11, 2024 3

Small correction for this command (in 2nd comment ) that I came across on Ubuntu 16.04
sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev
Error : Unable to locate package clibcurl4-openssl-dev

So I tried
sudo apt-get install pkg-config libssl-dev libsslcommon2-dev
And this still worked

from mongo-php-driver.

geoherna avatar geoherna commented on August 11, 2024 1

@necromant2005 solution worked perfectly for me. Thanks ! 🍻

from mongo-php-driver.

bjori avatar bjori commented on August 11, 2024

(also "-beta" is no longer needed -- the 1.0.0-stable has been released :))

from mongo-php-driver.

pocketmax avatar pocketmax commented on August 11, 2024

ug, sorry. I was thinking of a different VM I was testing with. omg, it's the very next line BEFORE the openssl error line and I didn't notice it. Sorry, ID-10T issue.

from mongo-php-driver.

derickr avatar derickr commented on August 11, 2024

@necromant2005 Can you post your "config.log" somewhere (pastebin.com)? And provide a link here?

from mongo-php-driver.

zakhttp avatar zakhttp commented on August 11, 2024

@pocketmax i did the same and it worked! thanks!

from mongo-php-driver.

Devidian avatar Devidian commented on August 11, 2024

@necromant2005 Thanks, worked for me on Debian 8.3 too!

from mongo-php-driver.

 avatar commented on August 11, 2024

On Ubuntu 16.04 I removed libcurl14-openssl-dev and works too

from mongo-php-driver.

ostojicmilica avatar ostojicmilica commented on August 11, 2024

I am on Ubuntu 14.10 and I get same error but when I try to run everything that @necromant2005 said I get errors:

E: Package 'pkg-config' has no installation candidate
E: Unable to locate package libsasl2-dev

from mongo-php-driver.

jmikola avatar jmikola commented on August 11, 2024

@ostojicmilica: Those look like apt-get errors. Both of those packages should certainly exist in 14.04:

If you're unable to get those installed, you may want to inquire in an Ubuntu support forum.

AFAIK, our config.m4 only relies on pkg-config for locating the system libbson or libmongoc libraries. PHP core also uses it for locating SSL libraries in PHP_SETUP_OPENSSL(); however, they fall back to searching common system paths if pkg-config is not available. For SASL, which is specific to the driver, we merely search some common system paths (i.e. pkg-config is not used).

Explicit paths for both OpenSSL and SASL may be set with the --with-openssl-dir=/path/to/ssl and --with-mongodb-sasl=/path/to/sasl options to the configure script, respectively. In that case, pkg-config would not be needed for detecting OpenSSL.

from mongo-php-driver.

ostojicmilica avatar ostojicmilica commented on August 11, 2024

Maybe the problem is because I dont use 14.04, but 14.10 Ubuntu .

And can you tell me how to find these paths? @jmikola

from mongo-php-driver.

jmikola avatar jmikola commented on August 11, 2024

And can you tell me how to find these paths?

The OpenSSL library path will contain include/openssl/evp.h within it. The SASL library path should contain include/sasl/sasl.h within it. I'm discerning this by walking through the search logic in PHP_SETUP_OPENSSL() and this extensions' config.m4 file; however, I do not have a specific answer for your environment.

Maybe the problem is because I dont use 14.04, but 14.10 Ubuntu .

My mistake for misreading your last post. The packages are still present in 14.10, though:

I should reiterate that if you are receiving the following errors:

E: Package 'pkg-config' has no installation candidate
E: Unable to locate package libsasl2-dev

...that really hints at a problem with your operating system's package manager and is likely outside the scope of this PHP extension.

from mongo-php-driver.

berzavlu avatar berzavlu commented on August 11, 2024

u r god! @necromant2005

from mongo-php-driver.

jmikola avatar jmikola commented on August 11, 2024

I've created PHPC-1237 so we can improve the installation notes on PHP.net to list a number of packages from #138 (comment). The current documentation is OS-agnostic, but I realize it'd be more helpful to list package names for the most common Linux distributions (e.g. Debian/Ubuntu and perhaps Fedora/CentOS).

from mongo-php-driver.

josergc avatar josergc commented on August 11, 2024

sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev

in xenial

sudo apt-get install  pkg-config libssl-dev libsslcommon2-dev 

fixed my problem. apt was complaining about clibcurl4-openssl-dev package is not found...

from mongo-php-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.