I have installed LAMPP on Ubuntu 16.04 LTS Server and Mongo DB installed. Now I am trying to install MongoDB driver to PHP.
sudo /opt/lampp/bin/pecl install mongo
It is throwing me the below showing error
WARNING: "pecl/mongo" is deprecated in favor of "channel:///mongodb" downloading mongo-1.6.14.tgz ...
Starting to download mongo-1.6.14.tgz (210,095 bytes)
.............................................done: 210,095 bytes
118 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
Build with Cyrus SASL (MongoDB Enterprise Authentication) support? [no]:
building in /tmp/pear/temp/pear-build-rootL9IHAe/mongo-1.6.14
running: /tmp/pear/temp/mongo/configure --with-php-config=/opt/lampp
/bin/php-config --with-mongo-sasl=no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... no
configure: error: in `/tmp/pear/temp/pear-build-rootL9IHAe/mongo-1.6.14':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: `/tmp/pear/temp/mongo/configure --with-php-config=/opt/lampp
/bin/php-config --with-mongo-sasl=no' failed
But the same command working on Ubuntu 16.04 LTS Client. Unable to fix this even after googling a lot.Looking for Solution!