我在将Couchbase PHP扩展程序(模块)安装到官方PHP 7.0 Alpine docker映像时出现问题。
我已设法安装并启用 XDebug 和 OPCache 扩展程序,但无法为 intl 执行此操作 Couchbase 扩展程序。
我使用过PECL,Alpine软件包和docker-php-ext-*
命令,但最终都给了我各种错误信息。如下所示:
#RUN docker-php-ext-enable /usr/lib/php7/intl.so
# nm: /usr/lib/php7/intl.so: no symbols
#RUN cp /etc/php7/conf.d/00_intl.ini $PHP_CONFIG_SCAN_DIR/intl.ini
# PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/intl.so' - Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20151012/intl.so: No such file or directory in Unknown on line 0
# not even with echo extension=/usr/lib/php7/intl.so > $PHP_CONFIG_SCAN_DIR/intl.ini
#COPY ./php/couchbase.ini $PHP_CONFIG_SCAN_DIR/couchbase.ini
# PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php7/couchbase.so' - Error relocating /usr/lib/php7/couchbase.so: php_log_err_with_severity: symbol not found in Unknown on line 0
#RUN docker-php-ext-enable /usr/lib/php7/couchbase.so
# nm: /usr/lib/php7/couchbase.so: no symbols
# PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php7/couchbase.so' - Error relocating /usr/lib/php7/couchbase.so: php_log_err_with_severity: symbol not found in Unknown on line 0
#RUN docker-php-ext-enable /usr/lib/php7/opcache.so
# PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php7/opcache.so' - Error relocating /usr/lib/php7/opcache.so: zend_vm_set_opcode_handler_ex: symbol not found in Unknown on line 0
#RUN docker-php-ext-enable /usr/lib/php7/modules/couchbase.so
# error: does not exist
包含所有实验结果的我的Dockerfile位于this gist。
答案 0 :(得分:0)
您可以在官方文档中找到安装说明 https://developer.couchbase.com/documentation/server/current/sdk/php/start-using-sdk.html
您确定已安装所有依赖项吗?特别是libcouchbase。您的dockerfile已将此部分注释掉。