槽痞

docker中php安装了扩展之后开启扩展的命令


请求mongo报错 The SCRAM_SHA_1 authentication mechanism requires libmongoc built with ENABLE_SSL,原因在没有开启容器的ssl,因此需要装ssl相关的依赖。

其中开启容器内ssl的问题,先运行apt-get update可能会遇到如下的报错:

N: Repository 'http://mirrors.linode.com/debian buster InRelease' changed its 'Version' value from '10.8' to '10.10'
E: Repository 'http://mirrors.linode.com/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://mirrors.linode.com/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://mirrors.linode.com/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

解决办法是加个参数:sudo apt-get update --allow-releaseinfo-change

再运行apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev应该就可以了。

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »