Actions

CentOS 8运行其它环境编译的curl报77错误解决方法

此问题来源于经过Github Actions编译出来的curl执行程序,由于actions默认的构建环境都是Ubuntu的,编译构建出来的新版本curl放到CentOS 8上运行时,会提示类似如下内容的错误(仅限需要用到ssl证书的协议,如https):

curl: (77) error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
...
curl: (77) Error reading ca cert file /etc/ssl/certs/ca-certificates.crt - mbedTLS: (-0x3E00) PK - Read/write of file failed

按照网上搜到的说法,重新yum安装ca-certificates之类的都不起作用,查看/etc/ssl/certs目录,发现有如下内容:

Continue reading…