栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Docker下php7启用mongodb的SSL连接扩展

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Docker下php7启用mongodb的SSL连接扩展

首先、降级libssl版本:

root@46206c442378:~/mongodb-1.13.0# apt-get install libssl1.1=1.1.1-1ubuntu2.1~18.04.17
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
  libssl1.1
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 25 not upgraded.
Need to get 1302 kB of archives.
After this operation, 145 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.17 [1302 kB]
Fetched 1302 kB in 1s (1209 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
dpkg: warning: downgrading libssl1.1:amd64 from 1.1.1d-0+deb10u4 to 1.1.1-1ubuntu2.1~18.04.17
(Reading database ... 15497 files and directories currently installed.)
Preparing to unpack .../libssl1.1_1.1.1-1ubuntu2.1~18.04.17_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.17) over (1.1.1d-0+deb10u4) ...
Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.17) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Processing triggers for libc-bin (2.28-10) ...
root@46206c442378:~/mongodb-1.13.0# apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  libssl-doc
The following NEW packages will be installed:
  libssl-dev
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 1568 kB of archives.
After this operation, 7853 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libssl-dev amd64 1.1.1-1ubuntu2.1~18.04.17 [1568 kB]
Fetched 1568 kB in 6s (257 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libssl-dev:amd64.
(Reading database ... 15496 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.1.1-1ubuntu2.1~18.04.17_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.17) ...
Setting up libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.17) ...

然后、安装phpmongodb扩展:

root@46206c442378:~/mongodb-1.13.0# pecl install mongodb
PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/mongodb.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mongodb.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/mongodb.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
downloading mongodb-1.13.0.tgz ...
Starting to download mongodb-1.13.0.tgz (1,440,287 bytes)
.............................................................................................................................................................................................................................................................................................done: 1,440,287 bytes
674 source files, building
running: phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
building in /tmp/pear/temp/pear-build-defaultuserOFyE7o/mongodb-1.13.0
running: /tmp/pear/temp/mongodb/configure --with-php-config=/usr/local/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20170718
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.1.1 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable MongoDB support... yes, shared
checking PHP version... 7.2.34
/tmp/pear/temp/mongodb/configure: line 4488: test: : integer expression expected
checking whether to enable developer build flags... no
checking whether to enable code coverage... no
checking whether to compile against system libraries instead of bundled... no
checking whether to use system libbson... no
checking whether to use system libmongoc... no
checking whether to enable client-side encryption... auto
checking for gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking accept ARG2 => struct sockaddr ARG3 => socklen_t ... ok
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for typeof syntax and keyword spelling... typeof
checking for __sync_add_and_fetch_4... yes
checking for __sync_add_and_fetch_8... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for strings.h... (cached) yes
checking whether byte ordering is bigendian... no
checking for strnlen... yes
checking for reallocf... no
checking for syscall... yes
checking for SYS_gettid... yes
checking for snprintf... yes
checking for strlcpy... no
checking for struct timespec... yes
checking for library containing clock_gettime... none required
checking for library containing floor... -lm
checking for gmtime_r... yes
checking for rand_r... yes
checking for arc4random_buf... no
checking if compiler needs -Werror to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking whether PTHREAD_ONCE_INIT needs braces... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PHP_MONGODB_SNAPPY... no
checking for snappy_uncompress in -lsnappy... no
checking snappy-c.h usability... no
checking snappy-c.h presence... no
checking for snappy-c.h... no
checking for PHP_MONGODB_ZLIB... no
checking for compress2 in -lzlib... no
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
checking for unistd.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for PHP_MONGODB_ZSTD... no
checking for ZSTD_compress in -lzstd... no
checking zstd.h usability... no
checking zstd.h presence... no
checking for zstd.h... no
checking for res_nsearch... yes
checking for res_ndestroy... no
checking for res_nclose... yes
checking whether to enable SASL for Kerberos authentication... auto
checking for PHP_MONGODB_SASL... no
checking for sasl_client_init in -lsasl2... no
checking sasl/sasl.h usability... no
checking sasl/sasl.h presence... no
checking for sasl/sasl.h... no
checking which SASL library to use... no
checking whether to enable crypto and TLS... auto
checking deprecated option for OpenSSL library path... auto
configure: checking whether OpenSSL is available
checking for PHP_MONGODB_SSL... yes
checking whether ASN1_STRING_get0_data is declared... yes
checking which TLS library to use... openssl
checking whether to use system crypto profile... no
checking deprecated option for whether to use system crypto profile... no
checking whether to enable ICU for SASLPrep with SCRAM-SHA-256 authentication... auto
checking for PHP_MONGODB_ICU... no
checking for shm_open... no
checking for shm_open in -lrt... yes
checking for sched_getcpu... yes
checking for socklen_t... yes
checking for struct sockaddr_storage.ss_family... yes
checking for pthread_join in LIBS= with CFLAGS=-pthread... yes
checking if compiler needs -Werror to reject unknown flags... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... (cached) yes
checking if weak symbols are supported... yes
checking which crypto library to use for libmongocrypt... openssl
checking whether byte ordering is bigendian... (cached) no
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/882497.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号