报错

[root@PandoraBox_2FC3:/root]#curl -o /dev/null "https://mirrors.tuna.tsinghua.edu.cn/centos/6.10/isos/x86_64/CentOS-6.10-x86_64-netinstall.iso"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (77) Error reading ca cert file /etc/ssl/certs/ca-certificates.crt - mbedTLS: (-0x3E00) PK - Read/write of file failed
[root@PandoraBox_2FC3:/root]#

原因

在没有安装 ca-bundle 时,使用 curl 访问 HTTPS 链接会出现错误 curl: (77) Error reading ca cert file /etc/ssl/certs/ca-certificates.crt - mbedTLS: (-0x3E00) PK - Read/write of file failed
OpenWrt / Pandrabox 官方固件并不支持 HTTPS,因此 wget, curl 甚至于 opkg 中都不能使用 HTTPS,因此安装 HTTPS 支持就很有必要了。

安装

下列命令一条一条去执行

opkg update
opkg install wget ca-certificates openssl-util ca-bundle

标签: Curl, 路由器, OpenWRT, PandoraBox

添加新评论