我在使用vm虚拟机安装Ubuntu,但我执行以下命令安装1panel面板时出现SSL证书问题,看命令结果:
minghui@mhubuntu21047:~$ curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
minghui@mhubuntu21047:~$
错误信息是curl报的SSL证书问题:无法获取本地颁发者证书。这通常是因为curl无法验证服务器的SSL证书,可能因为系统中缺少根证书或者证书链不完整。用户可能是在新安装的Ubuntu系统中没有安装完整的CA证书包,或者系统时间不正确,也可能是资源站点的证书有问题。
你遇到的 curl: (60) SSL certificate problem: unable to get local issuer certificate
错误是由于系统无法验证目标服务器的 SSL 证书导致的。
解决方法
1. 安装/更新根证书包
Ubuntu 默认使用 ca-certificates
包管理根证书。执行以下命令安装或更新:
sudo apt update && sudo apt install --reinstall ca-certificates
sudo update-ca-certificates --fresh
2. 检查系统时间
运行 date
命令检查系统时间是否准确。如果时间错误,同步网络时间:
# 安装时间同步工具(如果未安装)
sudo apt install ntpdate
# 同步时间
sudo ntpdate pool.ntp.org
3. 临时跳过 SSL 验证(不推荐)
如果问题仍未解决,可暂时绕过 SSL 验证(仅用于测试,存在安全风险):
curl -k -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
(添加 -k
或 --insecure
参数跳过证书验证)
评论