Cuando se utiliza el comando apt update en ubuntu20.04, se informa el siguiente error:
Err:1 http://linux.mellanox.com/public/repo/mlnx_ofed/5.1-2.5.8.0/ubuntu18.04/amd64 ./ InRelease
Temporary failure resolving 'linux.mellanox.com'
Err:2 https://mirrors.aliyun.com/ubuntu focal InRelease
Temporary failure resolving 'mirrors.aliyun.com'
Err:3 https://mirrors.aliyun.com/ubuntu focal-security InRelease
Temporary failure resolving 'mirrors.aliyun.com'
Err:4 https://mirrors.aliyun.com/ubuntu focal-updates InRelease
Temporary failure resolving 'mirrors.aliyun.com'
Err:5 https://mirrors.aliyun.com/ubuntu focal-backports InRelease
Temporary failure resolving 'mirrors.aliyun.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch https://mirrors.aliyun.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'mirrors.aliyun.com'
W: Failed to fetch https://mirrors.aliyun.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'mirrors.aliyun.com'
W: Failed to fetch https://mirrors.aliyun.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'mirrors.aliyun.com'
W: Failed to fetch https://mirrors.aliyun.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'mirrors.aliyun.com'
W: Failed to fetch http://linux.mellanox.com/public/repo/mlnx_ofed/5.1-2.5.8.0/ubuntu18.04/amd64/./InRelease Temporary failure resolving 'linux.mellanox.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
El juicio inicial es que el nombre de dominio no se puede resolver. Para resolver este problema, primero debe garantizar la conectividad de la red. Use el comando ping 8.8.8.8 para probar la conectividad de la red y luego use el siguiente comando para configurar el servidor DNS.
vi /etc/resolv.conf
Entonces entra
servidor de nombres 8.8.8.8
servidor de nombres 8.8.4.4
Salga y guarde, y luego descubra que apt update se puede ejecutar correctamente.