Ubuntu crashes, "sudo apt update" utters "Temporary failure resolving ‘security.ubuntu.com’"

Ubuntu Version:

22.04

Desktop Environment (if applicable):

Problem Description:

I have a Ubuntu 22.04 which crashes. So I want to reinstall Ubuntu to bring to back. But when I type “sudo apt update” command, it gives me a lot of errors:

Err http://security.ubuntu.com oneiric-security Release.gpg
  Temporary failure resolving ‘security.ubuntu.com’
Err http://archive.canonical.com natty Release.gpg
  Temporary failure resolving ‘archive.canonical.com’
Err http://extras.ubuntu.com natty Release.gpg
  Temporary failure resolving ‘extras.ubuntu.com’
Err http://gb.archive.ubuntu.com oneiric InRelease
Err http://gb.archive.ubuntu.com oneiric-updates InRelease
Err http://gb.archive.ubuntu.com natty-backports InRelease
Err http://gb.archive.ubuntu.com oneiric Release.gpg
  Temporary failure resolving ‘gb.archive.ubuntu.com’
Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg
  Temporary failure resolving ‘gb.archive.ubuntu.com’
Err http://gb.archive.ubuntu.com natty-backports Release.gpg
  Temporary failure resolving ‘gb.archive.ubuntu.com’

Reading package lists... Done
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease      
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease  
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease  
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease  
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease  
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease  
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’

Relevant System Information:

A dell 5820 precision workstation, AMD x86_64 CPU, all hardwares are working.

Screenshots or Error Messages:

What I’ve Tried:

I followed this article, but it’s not working: https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error

So, it seems that the network of the Ubuntu is not working. How to reinstall network on Ubuntu 20.04 using only CLI so that “sudo apt update” works?


Your details mention 22.04 (and end with mention of switching to 20.04?), but your pasted details are NOT from a 22.04 (or 20.04) system. Ubuntu 22.04 LTS’s codename is jammy (20.04’s is focal), where your details are from much older releases.

Ubuntu natty’s (11.04) EOL notice can be read at Ubuntu Fridge | Ubuntu 11.04 (Natty Narwhal) end-of-life reached on October 28, 2012

Ubuntu oneiric’s (11.10) EOL notice can be read at Ubuntu Fridge | Ubuntu 11.10 (Oneiric Ocelot) End of Life reached on May 9, 2013

You’ll note on both notices; there is warning that

will be archived to old-releases.ubuntu.com in the coming weeks.

which is why the errors you’re receiving… Those issues are not temporary, but permanent due to the EOL status.

Your paste imply you’re not using 22.04, but either 11.04 or 11.10, both of which are EOL.

As your release is so old (from 2011), I’d recommend you backup your data, and install a supported release of Ubuntu.

3 Likes

The details are different, because I cannot copy out the error message, so I copied from the overstack thread. But the error is the same:

Temporary failure resolving ‘security.ubuntu.com’
...
Failed to fetch http: ...

I am using 22.04, at least lsb_release says so.

Please post the output from this command:
inxi -r

If inxi is not installed, then:

sudo apt install inxi

Thanks. I have fixed the problem myself.

What was the problem?

To reply wxl:

I tried to upgraded 20.04 to 22.04, but it crashes in the middle. When I tried to reboot, I was trapped in initramfs prompts in which keyboard does not work. All answers I can find in Internet are cliches; no use at all.

So, I first try to get out of the initramfs prompts. To that end,

  1. I went to Walmart to buy a flash drive and made a USB Ubuntu installation disk, and boot it on the machine. Only version 24.04 works. The screen is all black if I use 22.04. Ubuntu just can’t stop making mistakes. Sigh~
  2. Use sudo lsblk -f to figure out the disks and partitions in the machine.
    Use sudo dumpe2fs /dev/my_partition | grep -i superblock to locate backup superblocks.
    Use sudo e2fsck -f -b 32768 /dev/my_partition to check disk integrity.
  3. Run the following commands to take over the control of the original Ubuntu:
    sudo mount /dev/sda2 /mnt/
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
    sudo chroot /mnt

Second, reinstall kernels. Note that chroot makes myself root already, no need to use sudo:
grub-install /dev/my_disk
update-grub
apt install --reinstall grub-common
sudo apt install --reinstall linux-image-6.8.0-52-generic
sudo update-initramfs -u -k 6.8.0-52-generic

Third, reboot and select the crashed Ubuntu in GRUB. I can enter the CLI of the crashed Ubuntu system, but I encountered the problem asked in this thread. To fix it:

  1. Run ip link show to figure out the network hardware in the machine. Found that the NIC eno1 is not up.
  2. Run sudo ip link set eno1 up to bring the interface up
  3. Run sudo dhclient eno1 to get an IP.
    Now I can run sudo apt update without problem.

Finally, reinstall the crashed Ubuntu: sudo apt-get install --reinstall ubuntu-desktop. The GUI login screen is back! There are still other problems, like can’t be accessed from other machine in the LAN. I will ask here if I can’t solve it by myself.

2 Likes

Wow, so simple (interface was down).

For what it’s worth, I don’t think your original post was very clear. There’s a lot of information in that last one that wasn’t there. Next time you do one of these, please give us all the details so we can better assist.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.