我已经使用以下过程为 PHP 安装了 datastax cassandra 驱动程序扩展:
- 安装依赖:automake cmake gcc gcc-c++ git libtool openssl-devel wget gmp gmp-devel boost php-devel pcre-devel git libuv gmp
- 从源码编译安装cpp-driver
- 从源代码安装 PHP Datastax cassandra 驱动程序
- 在 /etc/php.ini 文件中添加了扩展名
当我尝试执行 php 文件以连接到 cassandra 集群时,出现以下错误:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/cassandra.so'
- /usr/lib64/php/modules/cassandra.so: undefined symbol: cass_cluster_set_whitelist_dc_filtering in Unknown on line 0
我尝试使用二进制文件再次安装,但我仍然面临同样的问题。
这是 ldd 输出:
ldd /usr/lib64/php/modules/cassandra.so
linux-vdso.so.1 => (0x00007ffe9ad9a000)
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00007f2377ca2000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f2377a35000)
libz.so.1 => /lib64/libz.so.1 (0x00007f237781f000)
libuv.so.1 => /usr/lib64/libuv.so.1 (0x00007f23775fe000)
librt.so.1 => /lib64/librt.so.1 (0x00007f23773f5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f23771d8000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f2376fbf000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2376dba000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2376b36000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f2376830000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2376619000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2376285000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f2376041000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f2375d59000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f2375b55000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f2375929000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f2375544000)
/lib64/ld-linux-x86-64.so.2 (0x00000030d4a00000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f2375339000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f2375135000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f2374f1b000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f2374cfb000)
谢谢你的帮助。