Tobias Gassmann Tobias Gassmann - 2 years ago 305
PHP Question

pecl install cassandra throws: "error: Unable to load libcassandra"

pecl install cassandra

produces an error:

configure: error: Unable to load libcassandra

ERROR: `/tmp/pear/temp/cassandra/configure' failed

This error message is subject of another question here on SO, but has not been resolved: Installing php datastax driver on ubuntu

Can anybody help?

Answer Source

You are missing cassandra C++ driver. I have run into the same issue on Ubuntu 14.04. I have done the following and it worked for me:

Prerequisites (Ubuntu 14.04):

sudo apt-get install php-pear php5-dev libgmp-dev libpcre3-dev g++ make cmake libssl-dev openssl

Download the following packages:


Install them in this order using 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

You should be able to install cassandra using pecl. Don't forget to add to your php.ini file and restart php process.

Based on an answer in the discussion you linked before.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download