Comments (24)
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.
fixed it...
sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev
from mongo-php-driver.
last solution:
sudo apt-get install pkg-config libssl-dev
from mongo-php-driver.
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.
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.
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.
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.
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.
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.
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.
@necromant2005 solution worked perfectly for me. Thanks ! 🍻
from mongo-php-driver.
(also "-beta" is no longer needed -- the 1.0.0-stable has been released :))
from mongo-php-driver.
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.
@necromant2005 Can you post your "config.log" somewhere (pastebin.com)? And provide a link here?
from mongo-php-driver.
@pocketmax i did the same and it worked! thanks!
from mongo-php-driver.
@necromant2005 Thanks, worked for me on Debian 8.3 too!
from mongo-php-driver.
On Ubuntu 16.04 I removed libcurl14-openssl-dev and works too
from mongo-php-driver.
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.
@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.
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.
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.
u r god! @necromant2005
from mongo-php-driver.
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.
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)
- apache stop when I added extension=mongodb.so to php.ini HOT 3
- `selectServer` takes too long on official php base image (connections opened sequentially) HOT 13
- libbson Bug Report : variable ret value type error HOT 8
- No suitable servers found (`serverSelectionTryOnce` set) when rs.initiate with localhost HOT 5
- Extract mongodb-1.6.2.tgz error HOT 5
- Sporadic "Authentication failed" errors HOT 8
- MongoDB PHP Driver 1.15+ increases PHP memory consumption HOT 7
- Error while compiling on macOS HOT 7
- Major slowdown since version 1.17.0 HOT 8
- PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' HOT 2
- MongoDB reporting "AuthenticationAbandoned: Overridden by new authentication session" for a PHP client HOT 14
- Windows build after 1.13.0 HOT 4
- linux general protection fault , sorry for my poor english HOT 1
- PHP refusing to load MongoDB PHP driver on Windows (on one machine but not another) HOT 1
- Can't download desired extension HOT 2
- Unable to install pecl mongodb-1.15.1 in php 8.2 HOT 1
- Bug & Question: How to compile mongodb statically into PHP? HOT 9
- PHPStorm Stub for Manager class has outdated signature HOT 1
- Cannot install with laravel 11 HOT 1
- Cannot run ./configure cmd - error: cannot find input file: 'config.h.in'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongo-php-driver.