phpcassandradatastaxpecldatastax-php-driver

pecl install cassandra throws: “error: Unable to load libcassandra” on OS X


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


Solution

  • 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