【问题标题】:How to fix WARNING: Module cassandra ini file doesn't exist under /etc/php/7.1/mods-available如何修复警告:/etc/php/7.1/mods-available 下不存在模块 cassandra ini 文件
【发布时间】:2019-07-12 18:49:05
【问题描述】:

如何解决这个错误,

警告:/etc/php/7.1/mods-available 下不存在模块 cassandra ini 文件

我在使用 deb 包为 cassandra libraray 安装 php 驱动程序时遇到此错误。

http://downloads.datastax.com/php-driver/ubuntu/16.04/cassandra/v1.3.2/

cannot open /include/cassandra.h (No such file or directory) configure: error: not supported. Driver version 2.7.0+ required (found ) ERROR: `/tmp/pear/temp/cassandra/configure --with-php-con

【问题讨论】:

    标签: php cassandra


    【解决方案1】:

    我重新尝试并能够解决它。

    这里有一个技巧:

    to avoid error
    
    (cannot open /include/cassandra.h (No such file or directory) configure: error: not supported. Driver version 2.7.0+ required (found ) ERROR: `/tmp/pear/temp/cassandra/configure --with-php-con
        ) is I executed all command at '/' directory not in home or any other directory.
    
    ###################
    
    sudo git clone https://github.com/datastax/php-driver.git
    cd php-driver/
    git submodule update --init
    sudo chmod -R 777 /php-driver/
    cd ext
    sudo ./install.sh
    sudo phpize
    sudo ./configure
    sudo make install
    

    之后添加到 php.ini

    ; DataStax PHP Driver for Apache Cassandra
    extension=cassandra.so
    

    并使用重新启动 apache2

    sudo service apache2 restart
    

    并检查了 php 模块 usnig

    php -m //it reflects cassandra module
    

    【讨论】:

      猜你喜欢
      • 2016-10-09
      • 2018-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多