1

I'm running Debian buster 10.7 with i3 window manager on a i686 arch personal pc. Just for the sake of experimentation, I did apt remove lightdm, and thought that it would be fine with just a tty login prompt rather than default lightdm. When I typed in apt remove lightdm, it also showed a bunch of packages that said are no longer needed and could be removed with apt autoremove. So I went with it, I did apt remove lightdm && apt autoremove, and then I noticed while autoremove was complete, it also uninstalled network-manager. At first glance, I thought it deleted a previous version of network manager since I updated the system yesterday. I went along and did a reboot. Then plugged in my cable, and there was no internet. I tried my phone's tethering as well, which I frequently use for net browsing and such. Now I'm left with an offline pc. I did ip addr, and it shows my cord is connected, but no ipv4 address is shown, which usually did before.

I did as root systemctl start NetworkManager, and it said, it was masked. I did systemctl status NetworkManager, it says dead service. I did systemctl unmask NetworkManager.service, and then systemctl start NetworkManager now it says no service NetworkManager.service found.

I'm failry a noob. What can I do to fix this issue.

0
1

First, you need to get an Internet connection: connect your Ethernet cable, use ip link to display your interfaces network (e,g: enp2s0 interface and 192.168.0.1 gatway), then run the follwoing command:

sudo ip link set enp2s0 up 
sudo ip addr add 192.168.0.100/24 dev enp2s0
sudo ip route add default via 192.168.0.1

then you will be able to install the missnig packages through apt:

sudo apt update
sudo apt install network-manager
6
  • Unfortunately, isn't working for me. I ran ip a and got 3 interfaces, lo, enp2s0 and enp0s29f7u1. I tried what you suggested, just replacing eth0 with enp0s29f7u1. Network excahnges seems to be null, if I ran tcpdump.
    – losethos
    Dec 12 '20 at 14:18
  • Two options popped in my head. If I ran apt install network-manager, the list of packages that shows up as dependencies, I could manually download them from deb.debian.org/debian/ and place them and then finally download and install network-manager.deb and install it, or the second option is to reinstall the whole os.
    – losethos
    Dec 12 '20 at 14:21
  • 1
    @honeymoly could you run sudo dhclient enp2s0 let's see the results.
    – GAD3R
    Dec 12 '20 at 14:37
  • 1
    Hey @GAD3R, I manually downloaded all the 5 *.deb packages from deb.debian.org/debian and did dpkg -i * to install all the deb pacakages. I can access the internet and am writing this from my pc. Also, in the process of removing lightdm(which autoremoved 218 MB of space), I also noticed that, notify-send also doesn't work for some odd reason. I'm thinking of backing up everything and reinstalling debian. Startx seems to have issues as well.
    – losethos
    Dec 12 '20 at 15:45
  • 1
    The debian I'm using came with xfce4 desktop environment. If I logged into xfce DE at first, notify-send works fine, however, if I log in to i3 window manager after boot, notify-send doesn't work. It used to prior to deleting lightdm and apt autoremove. But here's the fun part, if I logged into xfce, then log out, and log back in to i3, notify-send wroks then.
    – losethos
    Dec 13 '20 at 7:30
1

The way I solved my issue was to first check which packages/dependencies debian pulls for the required network-manager package. So, I issued this on the terminal as a root user;

apt show network-manager

This will show the necessary libraries under depends subtitle. Next run;

apt install network-manager -y

Although you should be offline at this point, but debian will list out the url's at this point with the package names on your terminal. This will be something like

failed to fetch https://deb.debian.org/debian buster main network-manager_14.0.5-amd64.deb

Go ahead and download the required package which shows up after failed and the url. For example, to download the network-manager from the previous link, you'd have to go to your browser, then type in

https://deb.debian.org/debian/main/pool/n/network-manager

then download the package from there from another device which has internet access and place all the *.deb pakcages in your debian pc.Then to install them, just type in dpkg -i "your-package-name.deb". If you happen to place all the *.deb packages under same directory, you can install all of them with dpkg -i *.

I'm sure this is not a proper way to solve the issue, especially incase you don't happen to have another device with internet access. But I got lucky. Hopefully someone comes up with a proper solution. It's still weird to me that running apt remove lightdm && apt autoremove removed a whole bunch of packages, might I add essential ones such as network-manager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.