doulan6150 2019-02-19 09:53
浏览 748
已采纳

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

How to fix this error,

WARNING: Module cassandra ini file doesn't exist under /etc/php/7.1/mods-available

I got this error while installing php driver for cassandra libraray using deb package.

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
  • 写回答

1条回答 默认 最新

  • douxianji3367 2019-02-19 12:20
    关注

    I re-tried and was able to resolve it.

    one trick here:

    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
    

    After that added to php.ini

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

    And restarted apache2 using

    sudo service apache2 restart
    

    and checked for php modules usnig

    php -m //it reflects cassandra module
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥15 DruidDataSource一直closing
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据