Open cherishman2005 opened 2 years ago
https://askubuntu.com/questions/597323/command-sudo-apt-get-update-runs-with-some-error
It may be a well-known bug in apt-get that does not use the system's DNS to resolve domains. To fix this you may need to add the following line to /etc/hosts (you can edit this file with sudo nano /etc/hosts or sudo gedit /etc/hosts):
extras.ubuntu.com 91.189.92.152
https://stackoverflow.com/questions/30316812/ubuntu-apt-get-unable-to-fetch-packages
add the following to your resolve.conf file /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
https://askubuntu.com/questions/1385440/ubuntu-sudo-apt-get-update-404-not-found-problem
Most of the repositories and PPAs in your sources.list are no longer available and are throwing errors. I'd recommend restoring the default repositories.
First, restore the default focal repositories using these commands:
mkdir ~/solution
cd ~/solution/
cat << EOF > ~/solution/sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner
EOF
sudo rm /etc/apt/sources.list
sudo cp ~/solution/sources.list /etc/apt/sources.list
Remove all the PPAs in your system:
sudo mv /etc/apt/sources.list.d/* ~/solution
Update the repositories:
sudo apt update
Now there should be no errors.
My system configuration:
Command: