make 尝试在 Centos 6 上安装 mongo php 驱动程序失败
make fails trying to install mongo php driver on Centos 6
我尝试了两种不同的方法来安装 mongodb php 驱动程序。
- 根据来自的指示进行编译
http://andres.jaimes.net/876/setup-mongo-php-module-centos-6/
- 发布(作为 root)pecl 安装mongo
服务器是 Centos 6.6(32 位),它最初是一个 6.5 virtualbox 映像(更新后)现在自称为 6.6
错误似乎从这里开始:
In file included from /var/tmp/mongo/io_stream.c:34:
/var/tmp/mongo/contrib/php-ssl.h:33:25: error: openssl/evp.h: No such file or directory
/var/tmp/mongo/contrib/php-ssl.h:34:26: error: openssl/x509.h: No such file or directory
/var/tmp/mongo/contrib/php-ssl.h:35:28: error: openssl/x509v3.h: No such file or directory
In file included from /var/tmp/mongo/io_stream.c:34:
/var/tmp/mongo/contrib/php-ssl.h:38: error: expected ‘)’ before ‘*’ token
/var/tmp/mongo/contrib/php-ssl.h:39: error: expected ‘)’ before ‘*’ token
/var/tmp/mongo/contrib/php-ssl.h:40: error: expected ‘)’ before ‘*’ token
/var/tmp/mongo/io_stream.c: In function ‘php_mongo_io_stream_connect’:
/var/tmp/mongo/io_stream.c:189: error: ‘X509’ undeclared (first use in this function)
/var/tmp/mongo/io_stream.c:189: error: (Each undeclared identifier is reported only once
/var/tmp/mongo/io_stream.c:189: error: for each function it appears in.)
/var/tmp/mongo/io_stream.c:189: error: ‘cert’ undeclared (first use in this function)
/var/tmp/mongo/io_stream.c:194: error: expected expression before ‘)’ token
make: *** [io_stream.lo] Error 1
ERROR: `make' failed
-其他注意事项:
php -v
PHP 5.6.6 (cli) (built: Feb 19 2015 10:19:59)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
mongo --version
MongoDB shell version: 2.6.8
openssl is installed 1.0.1e-30.e16_6_6.5.i686
我检查了其他(看似相关的)Stack 帖子,例如 MongoDB PHP driver can't installed Centos 6 cloud server - 但它似乎没有帮助或适用。
有任何想法吗?谢谢。
您似乎没有为 OpenSSL 安装 headers。
尝试yum install openssl-devel
(如果不是 root,则使用 sudo)然后重新编译。
对于任何人命令 yum install openssl-devel 都没有解决 Installing PHP56 Mongo Driver in centos instance try to use/install 这些先
sudo yum install php-pear
sudo yum install php56-devel
sudo yum install gcc
sudo yum install openssl-devel
sudo pecl install mongodb
我尝试了两种不同的方法来安装 mongodb php 驱动程序。
- 根据来自的指示进行编译 http://andres.jaimes.net/876/setup-mongo-php-module-centos-6/
- 发布(作为 root)pecl 安装mongo
服务器是 Centos 6.6(32 位),它最初是一个 6.5 virtualbox 映像(更新后)现在自称为 6.6
错误似乎从这里开始:
In file included from /var/tmp/mongo/io_stream.c:34:
/var/tmp/mongo/contrib/php-ssl.h:33:25: error: openssl/evp.h: No such file or directory
/var/tmp/mongo/contrib/php-ssl.h:34:26: error: openssl/x509.h: No such file or directory
/var/tmp/mongo/contrib/php-ssl.h:35:28: error: openssl/x509v3.h: No such file or directory
In file included from /var/tmp/mongo/io_stream.c:34:
/var/tmp/mongo/contrib/php-ssl.h:38: error: expected ‘)’ before ‘*’ token
/var/tmp/mongo/contrib/php-ssl.h:39: error: expected ‘)’ before ‘*’ token
/var/tmp/mongo/contrib/php-ssl.h:40: error: expected ‘)’ before ‘*’ token
/var/tmp/mongo/io_stream.c: In function ‘php_mongo_io_stream_connect’:
/var/tmp/mongo/io_stream.c:189: error: ‘X509’ undeclared (first use in this function)
/var/tmp/mongo/io_stream.c:189: error: (Each undeclared identifier is reported only once
/var/tmp/mongo/io_stream.c:189: error: for each function it appears in.)
/var/tmp/mongo/io_stream.c:189: error: ‘cert’ undeclared (first use in this function)
/var/tmp/mongo/io_stream.c:194: error: expected expression before ‘)’ token
make: *** [io_stream.lo] Error 1
ERROR: `make' failed
-其他注意事项:
php -v
PHP 5.6.6 (cli) (built: Feb 19 2015 10:19:59)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
mongo --version
MongoDB shell version: 2.6.8
openssl is installed 1.0.1e-30.e16_6_6.5.i686
我检查了其他(看似相关的)Stack 帖子,例如 MongoDB PHP driver can't installed Centos 6 cloud server - 但它似乎没有帮助或适用。 有任何想法吗?谢谢。
您似乎没有为 OpenSSL 安装 headers。
尝试yum install openssl-devel
(如果不是 root,则使用 sudo)然后重新编译。
对于任何人命令 yum install openssl-devel 都没有解决 Installing PHP56 Mongo Driver in centos instance try to use/install 这些先
sudo yum install php-pear
sudo yum install php56-devel
sudo yum install gcc
sudo yum install openssl-devel
sudo pecl install mongodb