Score:1

How to fix broken Packages without internet access

wf flag

so i've uninstalled pihole on ubuntu 22.04.01 and removed the dependancy iproute2 which lead to no internet access - network-manager seems to be removed also but i didnt within the uninstall. After I've tried to manually add the packages to resolve the issue, it kept showing more and more dependancies for each package i add. I feel like this will go on in a loop.

Packages i added with dpgk -i:

iproute2 libbpf0 network-manager (with dependancies via download * ) libndp0 libteamdctl0 isc-dhcp-client libdns-export1100 libisc-export1105 isc-dhcp-common

    Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Probieren Sie »apt --fix-broken install«, um dies zu korrigieren.
Die folgenden Pakete haben unerfüllte Abhängigkeiten:
 isc-dhcp-client : Hängt ab von: libdns-export1110 ist aber nicht installiert
 libdns-export1100 : Hängt ab von: libisc-export169 ist aber nicht installierbar
                     Hängt ab von: libssl1.1 (>= 1.1.0) ist aber nicht installierbar
 libisc-export1105 : Hängt ab von: libssl1.1 (>= 1.1.0) ist aber nicht installierbar
 network-manager-openvpn : Hängt ab von: openvpn ist aber nicht installiert
 network-manager-pptp : Hängt ab von: ppp (< 2.4.9-2~) ist aber nicht installiert
                        Hängt ab von: ppp (>= 2.4.9-1+~) ist aber nicht installiert
                        Hängt ab von: pptp-linux ist aber nicht installiert
E: Unerfüllte Abhängigkeiten. Versuchen Sie »apt --fix-broken install« ohne Angabe eines Pakets (oder geben Sie eine Lösung an).

It's german but the issue is clear i think. At this point i can't install or uninstall packages. Net-Tools is not installed so i cannot go into recovery and configure eth0.

There is no Snapshot. Tell me if you need any more information.

How do i return to regular/previous network configuration? Maybe with a Live USB of Ubuntu Desktop? Should i just Reinstall Ubuntu and re-add the Data, Snaps etc.?

Score:1
pl flag

You could reinstall, yes. However, it's fixable if you have a USB stick.

Either in a live environment or on another computer.

Boot live USB of Ubuntu desktop, grab the missing / removed packages via https://packages.ubuntu.com/ - for example, search for the package "iproute2" which takes us to https://packages.ubuntu.com/search?keywords=iproute2 -then click "Jammy" (the codename for 22.04) which leads us to https://packages.ubuntu.com/jammy/iproute2 then click your architecture "amd64" which leads to https://packages.ubuntu.com/jammy/amd64/iproute2/download where you can click a link on any mirror and it will download the deb.

Repeat that for every missing deb, then mount the internal disk, copy the debs over to a temporary folder on your home directory. Either do that directly if you're booted via the live environment, or copy onto a USB stick if not.

Reboot into the broken host machine, navigate to the folder with the debs in and sudo dpkg -i *.deb.

karel avatar
sa flag
That takes too long. I don't have time to do that. I download the first .deb file per your instructions, and then run a command of the form `apt install --simulate ./package-name.deb` (without `sudo`) iteratively which lists the missing dependencies for me as long as I run all the commands from the same directory. I run `ls *.deb` if I need to see what .deb files I downloaded.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.