Just change DNS
1 view DNS
vi /etc/resolv.conf
2 add after the original DNS
nameserver 114.114.114.114
nameserver 8.8.8.8
3 reassembly
sudo apt-get install build-essential
Prompt for update during loading
Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?
Just update
sudo apt-get update
4 check whether the installation is successful
gcc –version
reference resources
“Temporary failure resolving ‘CN. Archive. Ubuntu. Com’ appears in Ubuntu apt get install”_ Ben wolf CSDN blog