Error server certificate verification failed when flashing armbian certificate on Oneke Cloud


foreword

I bought a Wankeyun, installed an armbian 5.88 system
, and I can connect to the Internet, but I can’t install any software. I changed the Tsinghua source, Ali source, etc.,
all returned certificate errors, and then Baidu, they all said to use

sudo apt-get install ca-certificates

Error:

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

Install the ca-certificates package, but I can’t install any software because of the ca-certificates error, I’m speechless >_<

Manually download the installation package, the installation also reported an error, saying that my openssl version is too low, I need 1.1.1, mine is 1.1.0, and I am speechless again >_<

Just when I was about to give up, I tried everything I found online, and it worked (I don't know how...)


First make sure that your own time is correct,
check the system time

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

The current time output is correct, if it is a few hours behind, other time zones may be used

update time zone

 timedatectl set-timezone Asia/Shanghai

Approximate operation:

1. Change the http source (I feel that https should also work)

#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. Modify armbian.list

vim /etc/apt/sources.list.d/armbian.list
Change this file to the following:

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

3. Certificate authentication

apt install apt-transport-https ca-certificates

4. Update software source and index

sudo apt update
sudo apt upgrade

5. Install the certificate and update the certificate

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

6. Disable ssl

export NODE_TLS_REJECT_UNAUTHORIZED=0

7. Manually add the website certificate (it seems to have failed)

code:

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

sudo update-ca-certificates


explain:

insert image description here

8. Install the public key of the debian package (it seems useless)

code:

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

sudo apt-get update

explain:
insert image description here

Verify that the software can be installed:

Install nginx-test

sudo apt-get install nginx

If you are asked to enter y/n, it can be installed.
Enter y. After it is installed, enter nginx -t and the following content is 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

Summarize

Some of the above methods should be useless, and I don’t know which ones are useless,
and the order is not necessarily the same as mine,
but this is already all the possible methods I can find

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

Guess you like

Origin blog.csdn.net/lyk520dtf/article/details/130484982