Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在ubuntu上安装php datastax驱动程序_Php_Apache_Cassandra_Datastax_Datastax Php Driver - Fatal编程技术网

在ubuntu上安装php datastax驱动程序

在ubuntu上安装php datastax驱动程序,php,apache,cassandra,datastax,datastax-php-driver,Php,Apache,Cassandra,Datastax,Datastax Php Driver,我正在尝试为Cassandra安装datastax php驱动程序,运行以下命令时: pecl install ext/package.xml 从git中检出后,我收到以下消息: configure: error: Unable to load libcassandra ERROR: `/tmp/pear/temp/cassandra/configure' failed 有人能告诉我正确的方向,以便成功安装这个驱动程序吗 我使用的cassandra版本是2.1.8,所以可能驱动程序还没有更

我正在尝试为Cassandra安装datastax php驱动程序,运行以下命令时:

pecl install ext/package.xml
从git中检出后,我收到以下消息:

configure: error: Unable to load libcassandra

ERROR: `/tmp/pear/temp/cassandra/configure' failed
有人能告诉我正确的方向,以便成功安装这个驱动程序吗


我使用的cassandra版本是2.1.8,所以可能驱动程序还没有更新到cassandra的最新版本

以下步骤对我有效。YMMV

$ uname -a
3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64 GNU/Linux
安装一些prereq(从列表中删除
libuv-dev
):

立即尝试安装
libuv dev
将导致以下错误:

libuv依赖于libc6(>=2.14);然而: 系统上libc6:amd64的版本为2.13-38+deb7u8

喘息似乎有一个稍旧版本的
libc6
。走到杰西跟前,拿到2.14分。将以下内容添加到
/etc/apt/sources.list

deb ftp://ftp.debian.org/debian/ jessie main
deb-src ftp://ftp.debian.org/debian/ jessie main
运行以下命令后,将重新启动这些服务:mysql、exim4、cups、cron、atd、apache2

$ sudo apt-get update
$ sudo apt-get install libc6
$ sudo apt-get -f install
下载并安装以下文件:

$ wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/libuv_1.6.1-1_amd64.deb
$ wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/libuv-dev_1.6.1-1_amd64.deb
$ wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/cassandra-cpp-driver_2.1.0-1_amd64.deb
$ wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/cassandra-cpp-driver-dev_2.1.0-1_amd64.deb
$ sudo dpkg -i libuv_1.6.1-1_amd64.deb
$ sudo dpkg -i libuv-dev_1.6.1-1_amd64.deb
$ sudo dpkg -i cassandra-cpp-driver_2.1.0-1_amd64.deb
$ sudo dpkg -i cassandra-cpp-driver-dev_2.1.0-1_amd64.deb
下载并安装DataStax Cassandra PHP扩展:

$ git clone https://github.com/datastax/php-driver.git
$ cd php-driver
$ sudo pecl install ext/package.xml 
将扩展添加到
php.ini

$ sudo sh -c 'echo "extension=cassandra.so" >>/etc/php5/apache2/php.ini'
重新启动Apache:

$ sudo /etc/init.d/apache2 restart

使用
确认Cassandra是否出现此问题已得到解决phpinfo()中未引用错误的php.ini

您的
config.log
文件说明了什么?应位于生成它的目录中。cc:error:无法识别的命令行选项'-qversion'。不太确定我在找什么config.log任何帮助都会很感激你在用什么shell?你试过bash吗?我没有试过bash,因为我认为标准终端是必需的。
$ sudo /etc/init.d/apache2 restart