我正在尝试为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.
以下步骤对我有用.因人而异.
原文链接:https://www.f2er.com/ubuntu/451898.html$uname -a 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64 GNU/Linux
安装一些先决条件(从列表中删除libuv-dev):
$sudo apt-get install g++ make cmake libssl-dev libgmp-dev PHP5 PHP5-dev openssl libpcre3-dev
尝试立即安装libuv-dev将导致以下错误:
libuv depends on libc6 (>= 2.14); however:
Version of libc6:amd64 on system is 2.13-38+deb7u8.
Wheezy似乎有一个稍微旧版本的libc6.升到Jessie获得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
$sudo sh -c 'echo "extension=cassandra.so" >>/etc/PHP5/apache2/PHP.ini'
重启Apache:
$sudo /etc/init.d/apache2 restart