玩客云刷armbian证书错误server certificate verification failed


前言

买了一个玩客云,刷好了一个armbian 5.88系统
可以联网,但是无法安装任何软件,换了清华源、阿里源等,
全部返回证书错误,然后百度一下,都说要使用

sudo apt-get install ca-certificates

报错:

root@aml:~/tmp# sudo apt-get install ca-certificates
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ca-certificates is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

安装ca-certificates包,但是我就是因为ca-certificates错误安装不了任何软件,靓仔无语 >_<

手动下载安装包,安装也报错,说我的openssl版本太低,要1.1.1,我的是1.1.0,靓仔再次无语 >_<

就在我要放弃的时候,网上搜到的东西都试了一下,居然成功了(我也不知道怎么成功的……)


先确保自身时间是对的,
查看系统时间

root@aml:~# date
Thu May  4 14:09:23 CST 2023

输出当前时间表示对的,如果差了几个小时可能用的其他时区

更新时区

 timedatectl set-timezone Asia/Shanghai

大概操作:

1、换http源(感觉https应该也行)

#tsinghua source 清华源
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free

2、修改armbian.list

vim /etc/apt/sources.list.d/armbian.list
将这个文件改成下面内容:

deb https://mirrors.tuna.tsinghua.edu.cn/armbian stretch main stretch-utils stretch-desktop

3、证书认证

apt install apt-transport-https ca-certificates

4、更新软件源、索引

sudo apt update
sudo apt upgrade

5、安装证书、更新证书

sudo apt-get install ca-certificates【安装包】
sudo apt-get install --reinstall ca-certificates【重新安装包】
sudo update-ca-certificates

6、禁用ssl

export NODE_TLS_REJECT_UNAUTHORIZED=0

7、手动添加网站证书(好像失败了)

代码:

sudo wget https://mirrors.tuna.tsinghua.edu.cn/.well-known/ca-certificates.crt -O /etc/ssl/certs/ca-certificates.crt

sudo update-ca-certificates


解释:

在这里插入图片描述

8、安装debian软件包公钥(好像没啥用)

代码:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 648ACFD622F3D138 0E98404D386FA1D9

sudo apt-get update

解释:
在这里插入图片描述

验证是否可以安装软件:

安装nginx测试

sudo apt-get install nginx

如果让你输入y/n,就是可以安装了
输入y,等他安装好了后输入nginx -t出现下面内容就是OK了

root@aml:~/tmp# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

总结

上面的方法有些应该是没用的,我也不清楚那些没用,
然后顺序也不一定就是我那个顺序,
不过这已经是我能找到全部可能的方法了

参考:
https://www.jianshu.com/p/621165b985b9
https://www.jianshu.com/p/7daddbe56648
https://chat.openai.com/

猜你喜欢

转载自blog.csdn.net/lyk520dtf/article/details/130484982