おはようございます。MacOSのCassandra phpドライバ - クラス 'Cassandra SimpleStatement'が見つかりません。
通常私は* nixのOS
でこのOfficial Docsを使用してしかし、今、私はMacOSのを使用していますし、この命令はちょうど正しく動作しません。
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
私のロジックが、その場合には、私は私自身のことでDataStax C/C++ドライバを作る必要があることを教え:私はこのメッセージを得たpecl install cassandra
の場合は
php-driver\lib
の中で
cpp-driver
を削除し、
this instructionを使用すると、エラーのない新しいC/C++ドライバが作成されます。
だから、公式ドキュメントには書かれています:
Note The install.sh script will also compile and statically link into the extension a submoduled version of the DataStax C/C++ driver for Apache Cassandra. To use a version of cpp driver that you already have on your system, run phpize, ./configure and make install.
しかし、私はphp-drive/ext
から./configure
を実行しようと、私はほぼ同じエラーを得た:私は続けていても
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)
とそのエラーの実行後make install
それは私にそのログを与える:
/bin/sh /Users/antvirgeo/php-driver/ext/libtool --mode=install cp ./cassandra.la /Users/antvirgeo/php-driver/ext/modules
cp ./.libs/cassandra.so /Users/antvirgeo/php-driver/ext/modules/cassandra.so
cp ./.libs/cassandra.lai /Users/antvirgeo/php-driver/ext/modules/cassandra.la
----------------------------------------------------------------------
Libraries have been installed in:
/Users/antvirgeo/php-driver/ext/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20121212/
cp: /usr/lib/php/extensions/no-debug-non-zts-20121212/#[email protected]#: Operation not permitted
make: *** [install-modules] Error 1
Libraries have been installed in:
/Users/antvirgeo/php-driver/ext/modules
パスにphp.iniを追加しても、私のプロジェクトにはまだエラーClass 'Cassandra\SimpleStatement' not found
があります。 PHPモジュール
のリストでcassandra
は、私が間違って何をやっていることを示す
php -d="extension=modules/cassandra.so" -m
?
PS:この手順でうまく動作するDataStax php driverを使ってこのプロジェクトのParallelsにubuntu OSをインストールしました。
____upd:なし@Feroのすべての命令の後 何らかのエラー、私にこの示す/usr/local/bin/php -i | grep -A 10 "^cassandra$"
コマンド:
cassandra
Cassandra support => enabled
C/C++ driver version => 2.4.2
Persistent Clusters => 0
Persistent Sessions => 0
Directive => Local Value => Master Value
cassandra.log => cassandra.log => cassandra.log
cassandra.log_level => ERROR => ERROR
そして、まだ同じエラー - Class 'Cassandra\SimpleStatement' not found
______________UPDATED LAST:
をAaaaandそれは働いている!私は出力phpinfo();
を私のプロジェクトに書いて、他のPHPバージョンとphp.ini
を使ってApacheを実現しています。ここではextension=cassandra.so
ではありませんでした。
既に完了しました... 私がすでに書いているように、 'pecl install cassandra'が組み込みcppドライバで動作しなかった場合、私はこれらの指示を使用し、自分自身でcppドライバを構築します。 。 とにかくそれは動作しません。投稿のエラーを参照してください。 – ANTVirGEO
@ANTVirGEO元の回答を編集して、 'sudo make install '中のコピー操作が失敗した理由を理解し、ソースからビルドするためのステップバイステップ/スクリプト化の指示を与えるのを助けます。 – Fero
まずは、ステップバイステップの説明をいただきありがとうございます。これは非常に役に立ちます! 元々更新された投稿。 SIPをシャットダウンし、すべての手順を完了しても、同じエラーが発生しました。\ – ANTVirGEO