pecl install cassandra
产生错误:
configure: error: Unable to load libcassandra
ERROR: `/tmp/pear/temp/cassandra/configure’ Failed
此错误消息是SO上的另一个问题,但尚未解决:Installing php datastax driver on ubuntu
有人可以帮忙吗?
你缺少cassandra C驱动程序.我在Ubuntu 14.04上遇到了同样的问题.我做了以下工作,它对我有用:
先决条件(Ubuntu 14.04):
sudo apt-get install PHP-pear PHP5-dev libgmp-dev libpcre3-dev g++ make cmake libssl-dev openssl
下载以下包:
wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/dependenices/libuv/v1.8.0/libuv_1.8.0-1_amd64.deb wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/dependenices/libuv/v1.8.0/libuv-dev_1.8.0-1_amd64.deb wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/v2.4.1/cassandra-cpp-driver_2.4.1-1_amd64.deb wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/v2.4.1/cassandra-cpp-driver-dev_2.4.1-1_amd64.deb
使用dpkg按此顺序安装它们:
sudo dpkg -i libuv_1.8.0-1_amd64.deb sudo dpkg -i libuv-dev_1.8.0-1_amd64.deb sudo dpkg -i cassandra-cpp-driver-dev_2.4.1-1_amd64.deb sudo dpkg -i cassandra-cpp-driver_2.4.1-1_amd64.deb
你应该能够使用pecl安装cassandra.
不要忘记将extension = cassandra.so添加到您的PHP.ini文件并重新启动PHP进程.
基于您之前链接的讨论中的答案.