如何在Windows上为Cassandra安装Datastax-PHP驱动程序?

时间:2021-06-12 09:25:20

I am trying to install Datastax PHP driver for Cassandra from here and according to these instructions.
So far I have installed these dependencies: Bison, CMake, Git, ActiveState Perl, and Python. However, when I run the batch file mentioned in the instructions (vc_build.bat) it reports the next error:

我正在尝试从这里根据这些说明为Cassandra安装Datastax PHP驱动程序。到目前为止,我已经安装了这些依赖项:Bison,CMake,Git,ActiveState Perl和Python。但是,当我运行说明(vc_build.bat)中提到的批处理文件时,它会报告下一个错误:

Update cpp-driver submodule ... FAILED

See D:\php-driver-master\php-driver-master\ext\\build\log\cpp-driver.log for more details

Bison Not Found in PATH: Bison is required to complete build

Ensure Bison is installed in C:\GnuWin32

Also, the content of the cpp-driver.log file is:

此外,cpp-driver.log文件的内容是:

Update cpp-driver submodule 
fatal: Not a git repository (or any of the parent directories): .git

The problem is I already added the C:\GnuWin32 in the Path system variable by appending the ;C:\GnuWin32 to the string associated in the Path variable.

问题是我已经在Path系统变量中添加了C:\ GnuWin32,方法是将; C:\ GnuWin32附加到Path变量中关联的字符串。

What might be the problem?

可能是什么问题?

1 个解决方案

#1


0  

I think there is problem with the checking function in vc_build.bat. Just comment out the BISON checking in that file as below and you can make it work.

我认为vc_build.bat中的检查功能存在问题。只需注释掉BISON检查该文件,如下所示,您就可以使其正常工作。

REM Ensure additional build dependencies are installed
REM SET "PATH=!PATH!;!SYSTEMDRIVE!\GnuWin32\bin"
REM CALL :GETFULLPATH "!BISON!" BISON_FOUND
REM IF NOT DEFINED BISON_FOUND (
REM   ECHO Bison Not Found in PATH: Bison is required to complete build
REM   ECHO Ensure Bison is installed in !SYSTEMDRIVE!\GnuWin32
REM   ECHO.
REM   ECHO  !DOWNLOAD_URL_BISON!
REM   CHOICE /N /T 15 /D N /M "Would you like to download Bison now?"
REM   IF !ERRORLEVEL! EQU !YES! START !DOWNLOAD_URL_BISON!
REM   EXIT /B !EXIT_CODE_MISSING_BUILD_DEPENDENCY!
REM )

#1


0  

I think there is problem with the checking function in vc_build.bat. Just comment out the BISON checking in that file as below and you can make it work.

我认为vc_build.bat中的检查功能存在问题。只需注释掉BISON检查该文件,如下所示,您就可以使其正常工作。

REM Ensure additional build dependencies are installed
REM SET "PATH=!PATH!;!SYSTEMDRIVE!\GnuWin32\bin"
REM CALL :GETFULLPATH "!BISON!" BISON_FOUND
REM IF NOT DEFINED BISON_FOUND (
REM   ECHO Bison Not Found in PATH: Bison is required to complete build
REM   ECHO Ensure Bison is installed in !SYSTEMDRIVE!\GnuWin32
REM   ECHO.
REM   ECHO  !DOWNLOAD_URL_BISON!
REM   CHOICE /N /T 15 /D N /M "Would you like to download Bison now?"
REM   IF !ERRORLEVEL! EQU !YES! START !DOWNLOAD_URL_BISON!
REM   EXIT /B !EXIT_CODE_MISSING_BUILD_DEPENDENCY!
REM )