0

I have already installed all of cassandra and php pecl/pear dependencies and cassandra 3 is available on my mac and cqlsh is working healthy but after run pecl install cassandra , throws this:

configure: error: Unable to load libcassandra ERROR: `/private/tmp/pear/install/cassandra/configure --with-php-config=/usr/bin/php-config' failed

Nikhil Vaghela
  • 2,088
  • 2
  • 15
  • 30
Nasser Ghiasi
  • 362
  • 2
  • 16

2 Answers2

0

It's sometimes a bit complicated to install the driver. But i think one thing is really important for your: The php driver isn't compatible with cassandra 3.

Apache Cassandra versions 1.2, 2.0 and 2.1
DataStax Enterprise 3.1, 3.2, 4.0 and 4.5
PHP 5.5+ and PHP 7.0+
Compilers: GCC 4.1.2+, Clang 3.4+, and MSVC 2010/2012/2013/2015

The pecl installation also never worked on my machines. I build the driver by myself: https://github.com/datastax/php-driver/blob/master/ext/README.md After your installation, you have to add the module to your php.ini

Citrullin
  • 2,269
  • 14
  • 29
0

I found solution The problem was due to OS X 10.11 El Capitan's Rootless feature. To be able to install the extension into /usr/lib/php/* I had to temporarily disable the feature (instructions - please remember to re-enable it afterwards).

after do that I need to recompile cassandra driver with following commands:

git clone https://github.com/datastax/php-driver.git
cd php-driver
git submodule update --init
cd ext
./install.sh
phpize
./configure
make install

All dependencies We must install before compiling cassandra php driver:

brew install gmp
brew install libuv
brew install cmake
sudo chown -R $USER /usr/local
brew link cmake
brew unlink openssl && brew link openssl --force
brew install autoconf

brew install icu4c
pecl update-channels
brew link icu4c --force

pecl install intl
brew install pcre
Nasser Ghiasi
  • 362
  • 2
  • 16