Score:0

How to reinstall network manager after accidentally purging it?

ug flag

I accidentally purged my network manager and have been trying unsuccessfully to reinstall it. I tried to install network manager packages on a USB but it is showing me dependency problems which aren't fixed by an update prompt.

Description: 22.04.01
Release: 22.04
Codename: jammy

What it's showing me:

a blurry photograph of a screen with a terminal window

guiverc avatar
cn flag
You've not provided any OS/release details; my guess looking at your picture & the versions there is it's *jammy*, but it's easier if you tell us, and *jammy* doesn't tell us if its desktop/server (again picture looks like desktop), nor what media you're using. The package I looked up is `dbus | 1.12.20-2ubuntu4.1 | jammy-security | source, amd64, arm64, armhf, i386, ppc64el, riscv64, s390x` which isn't the same as what was on initial 22.04 media ; thus is your media current?
guiverc avatar
cn flag
What media did you use? a *daily* etc or does it align with your installed system? Please don't use pictures; text is easier to copy & paste and thus explore package versions. I looked at `dbus` as that's easy to type, for the key package versions I'd explore larger package names are required, but you only provided a picture (I can't copy/paste from a picture!)
Reyyan Saeed avatar
ug flag
I am really sorry @guiverc but I am not really accustomed to the norms here, I did not copy the exact text because my ubuntu is not connecting to the internet. I dont really what media you're talking about. This is a dual booted laptop that I did using a guide. Its 22.0 and jammy and amd64
Reyyan Saeed avatar
ug flag
Please offer layman and easy to understand solutions. I am very much new to this.
guiverc avatar
cn flag
This is a Q&A (or *Question & Answer*) site, and not a forum. If you add additional details, or make corrections - please do it in your question - as that is what is answered (it still doesn't mention an OS/release). Ubuntu's main releases are *year.month* in format; and *jammy* is the 2022-April release thus 22.04. You mentioned *packages on a USB* but not what media was on that USB; was it an old ISO? (22.04? 22.04.1? 22.04.2? or *daily*? if so which?) or did you download & create it yourself. Also be specific; 22.04 Desktop & 22.04 Server have different defaults. Also Welcome
guiverc avatar
cn flag
My guess is your media is older (22.04, 22.04.1 etc), maybe your installation media, where as your installed system you're trying to repair has been upgraded thus the timing differences I see in your photo, though as a photo and not text, I didn't copy/paste & compare the versions in the photo with what exists for each of the different medias... *We all learn, so don't let mistakes etc worry you.. yes some (me!) can maybe be a little terse as I spend a minute here between tasks & comments are often factual/fast more so than friendly before returning to where my thoughts are*
Reyyan Saeed avatar
ug flag
@guiverc I made the necessary changes to my post yes its 22.04.01 and release is 22.04. I am now attempting to install the relevant versions of the dependencies could you tell me what prompt should I write? Also another confusion is that according to the packages website all latest jammy versions are with me but my network manager seems to be newer and matches with the kinetic network manager version.
guiverc avatar
cn flag
The original 22.04 media had `network-manager | 1.36.4-2ubuntu1 | jammy | source, amd64, arm64, armhf, ppc64el, riscv64, s390x` where as the updated version will be `network-manager | 1.36.6-0ubuntu2 | jammy-updates | source, amd64, arm64, armhf, ppc64el, riscv64, s390x` .. the version in *kinetic* is `network-manager | 1.40.0-1ubuntu2 | kinetic | source, amd64, arm64, armhf, ppc64el, riscv64, s390x` (I'm using command line enquires but ~same data except CLI gives me ESM releases too) thus your issue is likely caused by corrupted sources...
guiverc avatar
cn flag
Providing a picture has limited what I'm willing to explore; given I can't easily copy/paste package details from a picture.. but your `network-manager` in the picture is **not** from a *jammy* system matching instead *kinetic* as you worked out ! so I'd check what you're actually running, and your sources on the system...
Reyyan Saeed avatar
ug flag
Thanks alot for your help buddy. You helped me figure out how ubuntu works and I was able to manually reinstall the packages according to Jammy and relevant versions.
Score:0
ug flag

I was able to manually install the jammy update network package and two other missing packages using the syntax:

sudo dpkg -i <packagename>

Make sure the packages correspond to the version of Ubuntu you are running.

Score:0
mq flag

I found background service still running after an old purge of TeamViewer. I ended up purging network manager. Lots of browsing. I ended up with.

Identifying netadapters (normally using Wifi)

sudo iwconfig

enp0s31f6 was my RJ45 wired network, wlp4s0 was my Wifi. I put in the cable connection

This command starts the network and I am able to reinstall across the internet:

sudo dhclient enp0s31f6

This command gave back all network:

sudo dpkg -i network-manager_1.40.0-1ubuntu2_amd64.deb

guiverc avatar
cn flag
The package you mention appears to be built for a *kinetic* system (ie. 22.10; *jammy* or 22.04 uses `1.36.6-0ubuntu2`) thus your 'answer' would create a *frakensystem* which includes a package that will [EOL in mere hours/days](https://fridge.ubuntu.com/2023/06/14/ubuntu-22-10-kinetic-kudu-reaches-end-of-life-on-july-20-2023/) & thus leaving a *jammy* system potentially vulnerable to security problems.. I'm not sure it's a wise option as written for Ubuntu 22.04 LTS (*jammy*)
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.