Source arrangement of various versions of ubuntu arm architecture

       

Table of contents

1. x86 organization

1、ubuntu 20.04

2、ubuntu 18.04

3、ubuntu 21.10

4、ubuntu 22.04

Two, the arm organization

1、ubuntu 20.04

2、ubuntu 18.04

3、ubuntu 21.10

4、ubuntu 22.04

 3. Problems

1. After changing to a domestic source, the https certificate problem is reported

2. If you choose a domestic open source station

​3、提示the public key is not available: NO_PUBKEY XXXX


Because the ubuntu system with arm architecture has incompatibility or update error when it runs through the container, here are the results of the past two days.
        The tested machines are centos7.5 and kylin v10 systems, corresponding to x86 and arm architectures respectively. Choose the dockerhub official website for the mirror warehouse. The apt source selects the default source and Tsinghua source for testing. The code name of each version of ubuntu's mirror source: 22.10: kinetic; 22.04: jammy; 21.10: impish; 20.04: focal; 18.04: bionic; 16.04: xenial; 14.04: trusty.
        Let me talk about the conclusion first, the update of the ubuntu21.10 version cannot be used, the normal arm of the 22.04 version x86 needs to add the --privileged parameter, and other versions are normal, and the progress will be supplemented later. Welcome everyone to leave a message

1. x86 organization

1、ubuntu 20.04

docker run -it --rm --name test ubuntu:20.04  bash

cat /etc/issue

cat /etc/apt/sources.list

By default, the official source Index of /ubuntu is used to update normally

Change to Tsinghua source, the default https address will report an error (refer to article 3.1), manually replace (how to use Tsinghua source refer to 3.2)

cat << EOF > /etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse
EOF

2、ubuntu 18.04

docker run -it --rm --name test ubuntu:18.04  bash

Official source ok, Tsinghua source ok

3、ubuntu 21.10

docker run -it --rm --name test ubuntu:21.10  bash

Official source error, Tsinghua source error

It is said that the release of impish has not been found. After reading the dists, it is indeed not there. This point is still under study. 

4、ubuntu 22.04

docker run -it --rm --name test ubuntu:22.04  bash

Official source ok

Two, the arm organization

1、ubuntu 20.04

docker run -it --rm --name test ubuntu:20.04  bash

cat /etc/issue

cat /etc/apt/sources.list

By default, the official source Index of /ubuntu-ports is updated normally

Change to Tsinghua source, the default https address will report an error (refer to article 3.1), manually replace

cat << EOF > /etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security multiverse
EOF

2、ubuntu 18.04

docker run -it --rm --name test ubuntu:18.04  bash

Official source ok, Tsinghua source ok

3、ubuntu 21.10

docker run -it --rm --name test ubuntu:21.10  bash

Official source error, Tsinghua source error

4、ubuntu 22.04

docker run -it --rm --name test ubuntu:22.04  bash

Official source error

Tried to register the key method, invalid (refer to 3.3)

At present, it can only be successfully updated by not verifying

docker run -it --rm --name test --privileged ubuntu:22.04  bash

  

Referenced: docker runs ubuntu22.04 abnormally (reproduced)_qq_43808467's blog-CSDN blog 

AGX Xavier Ubuntu 18.04 docker can not solve the apt update problem - Programmer Sought 

docker - apt update throws signature error in Ubuntu 20.04 container on arm - Ask Ubuntu 

 3. Problems

1. After changing to a domestic source, the https certificate problem is reported

Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification

ubuntu | mirror station use help | Tsinghua University open source software mirror station | Tsinghua Open Source Mirror

Solution:
There are two ways, manually install ca-certificates or change the source address to http.

Manually install the files required for ca-certificates:

https://download.csdn.net/download/weixin_39855998/87322568

2. If you choose a domestic open source station

 Take Tsinghua as an example, visit: Tsinghua University Open Source Software Mirror Station | Tsinghua Open Source Mirror

 Search the ubuntu mirror, ubuntu is x86, ubuntu-ports is arm architecture

Click the black question mark to directly copy the address of source.list

 

 Click to view dists to see which versions of packages currently exist

3、提示the public key is not available: NO_PUBKEY XXXX

        Register this key, and report missing package:

E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation (there is an infinite loop here, the update source needs to install the gnupg package, and the gnupg package needs to be updated first)

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys  871920D1991BC93C

         Don't believe in evil, just find all the dependent debs

        To install gnupg locally, continue

        No mistake this time

 

 

Guess you like

Origin blog.csdn.net/weixin_39855998/article/details/128385200