php7.2-curl 安装后出现 Curl 证书错误
Curl certificate error after php7.2-curl install
我使用 cacert.pem 来使用 Google Admanager API
我想在 php 文件中使用 curl_init 函数。它是未定义的,所以经过一些研究我尝试使用 apt-get install php7.2-curl
命令
安装它
在此之后我得到这个错误
cURL error 77: error setting certificate verify locations: CAfile: /etc/php/7.2/cacert.pem CApath: /etc/ssl/certs (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
我该如何解决?
谢谢
确定找到解决方案
我不知道为什么,但安装更改了 cacert.pem 文件的访问权限,所以我的网络服务器无法使用它。
我使用 cacert.pem 来使用 Google Admanager API
我想在 php 文件中使用 curl_init 函数。它是未定义的,所以经过一些研究我尝试使用 apt-get install php7.2-curl
命令
在此之后我得到这个错误
cURL error 77: error setting certificate verify locations: CAfile: /etc/php/7.2/cacert.pem CApath: /etc/ssl/certs (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
我该如何解决? 谢谢
确定找到解决方案
我不知道为什么,但安装更改了 cacert.pem 文件的访问权限,所以我的网络服务器无法使用它。