# 微信菜单添加报错

image

curl: (77) error setting certificate verify locations:CAfile: /etc/pki/tls/certs/ca-bundle.crtCApath: none

如果目标目标不存在,则需要通过运行
sudo mkdir -p /etc/pki/tls/certs

通过运行将证书复制到预期的目标

sudo cp /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt
# windows系统参考:

https://blog.csdn.net/ekey_code/article/details/78367535 (opens new window)

导致该问题的原因在于没有配置curl.cainfo,该配置位于php.ini中。

解决方案:

1)下载cacert.pem

https://curl.haxx.se/ca/cacert.pem (opens new window)

2)配置php.ini

[curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. curl.cainfo = 【你的绝对路径】

原文链接:https://blog.csdn.net/loophome/article/details/83112364 (opens new window)