小编ANT*_*GEO的帖子

MacOS 上的 Cassandra php 驱动程序 - 找不到“Cassandra\SimpleStatement”类

今天是个好日子。

通常我只是在 *nix OS 中使用这个官方文档

但是现在我正在使用 MacO,而此说明无法正常工作。

如果pecl install cassandra我收到此消息:

checking for supported DataStax C/C++ driver version... awk: can't open file /include/cassandra.h
 source line number 1
configure: error: not supported. Driver version 2.4.2+ required (found )
ERROR: `/private/tmp/pear/install/cassandra/configure --with-php-config=/usr/bin/php-config' failed
Run Code Online (Sandbox Code Playgroud)

我的逻辑告诉我,在这种情况下,我需要自己制作 DataStax C/C++ 驱动程序。在文件夹中,php-driver\lib我删除cpp-driver并使用此指令制作全新的 C/C++ 驱动程序,没有错误。

所以在官方文档中它说:

注意 install.sh 脚本还将编译并静态链接到扩展中的一个用于 Apache Cassandra 的 DataStax C/C++ 驱动程序的子模块版本。要使用系统上已有的 cpp 驱动程序版本,请运行 phpize、./configure 并进行安装。

但是当我尝试运行时./configurephp-drive/ext我得到了几乎相同的错误:

checking for supported DataStax C/C++ driver …
Run Code Online (Sandbox Code Playgroud)

php macos cassandra datastax datastax-php-driver

1
推荐指数
1
解决办法
1540
查看次数

标签 统计

cassandra ×1

datastax ×1

datastax-php-driver ×1

macos ×1

php ×1