Update errors including unmet dependencies

Success!!
After a bit of trial & error I selected:

  1. the previous kernel in recovery mode, then
  2. the root shell prompt, then
  3. sudo apt update && upgrade

There was much to upgrade and I didn’t see any errors flash by.
Then rebooted which took a long time but was fine.
All my files are up-to-date and openable, which is great relief. There are only a few that I hadn’t backed up, so I could have managed, but it’s nice to have everything.

Only one problem: although the pc connects to the wifi OK, neither Firefox nor Thunderbird can connect to the internet, so I am writing this on a spare laptop. Is this fixable, do you think? If not then I’ll just re-install Ubuntu from a live USB.

My grateful thanks as always.
Keith

EDIT
Still can’t access the internet, but worse than that is that usb devices are not recognised. The “df” command does not list any attached medium so backing up will be difficult. I’ve tried booting to a Mint live usb and it is possible to copy files to a usb, although it’s very fiddly. More later.

Ok, so it sounds like your network connection isn’t working … do you use a wired connection or WiFi? Either way, check with;

$ ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 2c:cf:67:89:d8:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.243/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 46267sec preferred_lft 46267sec
    inet6 2a00:23c7:3c21:cc01:65c3:fa16:f4dc:65ca/64 scope global dynamic noprefixroute 
       valid_lft 277sec preferred_lft 97sec
    inet6 fe80::5795:adc2:74c5:de81/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

This is an example ouput, what you’re looking for is your public ethernet port (usually “eth0”) and the “inet” line, which signifys your IPV4 internet address as issues to your machine by your local router… If you don’t have such a line, this likely your problem, i.e. the upgrade has messed with your network settings. You can check this via the GUI, make sure you have a primary network interface and that it’s set at DHCP. (i.e. automatic setup based on your local router / internet hub / whatever you have …

Checking the network settings, they look just right, including the inet line in “eth0” and DCHP set.
I am making progress in backing up the last month’s worth of files, but it will take a while.

So what address is it giving you?
Try;

$ ip route
default via 192.168.1.254 dev eth0 proto dhcp src 192.168.1.243 metric 100 
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.243 metric 100 

Can you ping the default route?
(192.168.1.254 in this example?)

Yes, I can ping the default ok.

Update on recovery:
I succeeded in getting the pc to recognise the usb device and have nearly finished backing up the few files, and I am really grateful for your help in gaining access to them.

For anyone else having trouble getting a pc to recognise a usb device:
ls /dev | grep sd
this will likely show (in my case) sda and sda1. then:
mount /dev/sda1 /mnt
where /mnt is the mount point.
One can then copy/create files on /mnt. Don’t forget to
umount /mnt

I just did an update which listed a huge number of errors - again. I think I shall just bite the bullet and re-install Ubuntu. It will be a bit of a pain to re-install all the small applications that I use in my coding, but better in the long-run.

Very many thanks as always.
Keith

Mmm, well if you can see the local router over the Internet, I’m not sure why access to the internet wouldn’t work. What happens if you ping “linux.co.uk” ?

“Ping: Linux.co.uk: Temporary failure in name resolution”

Ok, so your DNS is shot. This seems to be a shortcoming of current Linux systems, I often tend to bypass automatic setups these days just to get good / consistent DNS. To do this I do the following;

(make sure the resolver is installed, apt install systemd-resolved)
edit /etc/systemd/resolved.conf

[Resolve]
#DNS=
#FallbackDNS=
#Cache=

Ignoring all the other settings, convert to;

[Resolve]
DNS=1.0.0.1               # Cloudflare for quick updates
FallbackDNS=8.8.4.4       # Google backup for, well, everything
Cache=no-negative         # Don't cache dns lookup failures for fast updates

Then;

service systemd-resolved restart
ping linux.co.uk

See if that helps …

The file /etc/systemd/resolved.conf does not exist and I can’t install systemd-resolved because I don’t have internet access!
I did try copying resolved.conf from my working pc to the bad one, but as the systemd-resolved s/w is not installed it had no efffect, of course.
Now that I have backed up all my files, is it now time to re-install Ubuntu rather than persevere?

Well, your choice of course … :slight_smile: … the quick fix to get dns working (which should allow you to download stuff for a proper fix) is to edit /etc/resolv.conf and make it read;

nameserver 8.8.8.8

sudo ls -l /etc/resolv* gives:
/etc/resolv.conf → …/run/resolvconf/resolv.conf
and sudo cat resolved.conf gives nothing. Should I simply add “nameserver 8.8.8.8” to the empty file?

Ok, it’s a link to a file that should be populated by the system, but isn’t, hence the problem. Remove the file (link), then create a new one with one line as above … :slight_smile:

Sorry for my ignorance: do you mean remove the link or remove the file (which might then remove the link)? or create a file * /run/resolvconf/resolv.conf* ?

Ah: /run/resolvconf/resolv.conf is empty. Is this the one to add the line to?

rm /etc/resolv.conf

:slight_smile: then …

echo "nameserver 8.8.8.8" > /etc/resolv.conf

Well it worked but, bizarrely, when I entered service systemd-resolv.d restart it came up with an error: Failed to restart systemd-resolv.d service…service not found. But the pc suddenly downloaded emails and FF is working.

AND…update & upgrade worked without error. I did get file-roller upgrade will be deferred due to phasing then a long list of packages that have been kept back. Perhaps you could comment on that.

Thank you so much for your patience - I am very grateful.

Ok … so … service systemd-resolved restart should restart the service that populates /run/resolvconf/resolv.conf. By patching /etc/resov.conf you’ve bypassed the issue and FF should have been working immediately.

The service name is “systemd-resolved” rather than “systemd-resolv.d” hence the error. Once you successfully restart the service, “rm /etc/resolv.conf”, then restart it again should re-create the link so it’s back to where it should be and not relying on our /etc/resolv.conf patch.

Stuff “kept back” I think is an upgrade strategy to avoid too many updates all at once. i.e. it’s released, it’s there if you really want it now, or you could wait a bit while we try it on some guinea pigs to make sure there are no problems before you install. So if they roll out newer potentially questionable stuff to 100% of people all at once, it could break 100% of people … if they do it in 10% chunks, they’ve half a chance of putting the breaks on if someone sees a critical problem. I’m sure there’s docs somewhere, but that’s my expectation.
(M$ for example have historically had notable issues where global “update everyone all at the same time” has proved sub-optimal for them … ) :wink:

Here were the commands I have just issued again and resolved the issue:

keith@E5570:~$ sudo su
[sudo] password for keith:
root@E5570:/home/keith# rm /etc/resolv.conf
root@E5570:/home/keith# service systemd-resolved restart
Failed to restart systemd-resolved.service: Unit systemd-resolved.service not found.
root@E5570:/home/keith#

…or have I misunderstood something?

This would imply the previous command;

apt install systemd-resolved

Failed … if the service isn’t installed, it’s not going to do anything … (!)

I tried:

root@E5570:/home/keith# apt install systemd-resolved
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following packages will be REMOVED
resolvconf
The following NEW packages will be installed
systemd-resolved
0 to upgrade, 1 to newly install, 1 to remove and 72 not to upgrade.
Need to get 296 kB of archives.
After this operation, 702 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Ign:1 Index of /ubuntu noble-updates/main amd64 systemd-resolved amd64 255.4-1ubuntu8.4
Ign:1 Index of /ubuntu noble-updates/main amd64 systemd-resolved amd64 255.4-1ubuntu8.4
Ign:1 Index of /ubuntu noble-updates/main amd64 systemd-resolved amd64 255.4-1ubuntu8.4
Err:1 Index of /ubuntu noble-updates/main amd64 systemd-resolved amd64 255.4-1ubuntu8.4
Temporary failure resolving ‘gb.archive.ubuntu.com
E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd-resolved_255.4-1ubuntu8.4_amd64.deb Temporary failure resolving ‘gb.archive.ubuntu.com
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@E5570:/home/keith#

Running it (or apt update) with --fix-missing (as suggested on the last line) didn’t help.

Ok, so I’m guessing you are doing this after removing /etc/resolv.conf, which is the thing that was making your dns resolution work?

Order of work needs to be;

  • get dns working with patch to /etc/resolv.conf (as we did above)
  • make sure systemd-resolved is installed
  • make sure systemd-resolved restarts, technically you can check /run/systemd/resolve/stub-resolv.conf gets generated and looks ok
  • remove /etc/resolv.conf
  • restart the service again which should regenerate /etc/resolv.conf as a link

“Without” either resolve.conf either as a link or file, containing a valid nameserver, pretty much everything will fail as the system will be unable to translate URL’s into actual internet addresses …