0

I run command sudo apt-get purge network-manager-gnome network-manager. After running that command wireless and wired networks are not connected to my laptop. And when I look into "system setting->network, it is showing that the system network services are not compatible with this version.

2
  • 2
    Why should it work if you removed network-manager? If you want to setup your networking using config files then do it. What is your question?
    – Pilot6
    Jul 4, 2015 at 9:18
  • Why did you purge NM in the first place?
    – s3lph
    Jul 4, 2015 at 10:16

2 Answers 2

0

This can be fixed by installing packages back

sudo apt-get install network-manager-gnome network-manager

This probably will not work without internet connection.

If you are new to Ubuntu, it will be not easy for you to setup networking manually.

I suggest re-installing the system and be more careful in the future with running commands in terminal that you do not know.

4
  • when i run above command it is giving "Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package network E: Unable to locate package manager"
    – Sathi Ram
    Jul 4, 2015 at 9:37
  • This is because you are not connected to internet. If you just installed Ubuntu, the easiest solution will be to re-install it and do not run commands that you do not know.
    – Pilot6
    Jul 4, 2015 at 9:41
  • can i install network manager without internet ot is there any other way to get installe network manager??
    – Sathi Ram
    Jul 4, 2015 at 9:45
  • Yes, you can. But the problem is that some other packages has been removed too. You will need to download them all manually and install them using terminal commands. It is hard to give a step-by-step solution.
    – Pilot6
    Jul 4, 2015 at 9:48
0

I hope the dependencies didn't change from a 14.04.1 Live system (where I tested this) and your 15.04. As I found out, no other packages were removed in purging those two. You can verify this from your APT log:

cat /var/log/apt/history.log

For me this looks like:

Start Date: 2015-07-04   10:19:36
Commandline: apt-get purge network-manager network-manager-gnome
Purge: network-manager-gnome:amd64 (0.9.8.8-0ubuntu4.2), network-manager:amd64 (0.9.8.8-0ubuntu7)
End Date: 2015-07-04 10:19:51

Now you can go to another computer (no matter which OS) and download those packages (in the exact same versions as you uninstalled them). To find the download paths, first enter the following command for each purged package:

apt-cache policy <package name>

This will tell you from which repository the package was installed. For me and with network-manager, this produces output like network-manager: Installed: (none) Candidate: 0.9.8.8-0ubuntu4 Version table: *** 0.9.8.8-0ubuntu7 0 500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

So the package was installed form the Trusty main repository. Now, read the file /etc/apt/sources.list. You'll see some lines like

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted

Open this URL (http://archive.ubuntu.com/ubuntu/) in a browser on another system. As NM is in the main repo, navigate to pool/main/. There you will find directories, which name the beginnings of the packages inside it. To find the network-manager packages, you logically have to navigate to n/network-manager/ next.

Now, the version uninstalled from my system was 0.9.8.8-0ubuntu7 using the amd64 architecture. So I'll download the following file:

network-manager_0.9.8.8-0ubuntu7_amd64.deb

You'll find the other removed package, network-manager-gnome, in the directory pool/main/n/network-manager-applet. They are sometimes grouped together, and thus hard to find under certain circumstances.

Again, the removed version was 0.9.8.8-0ubuntu4.2, so I'll download that, if possible. Now, I was only able to find these:

network-manager-gnome_0.9.8.8-0ubuntu4.3_amd64.deb

 network-manager-gnome_0.9.8.8-0ubuntu4_amd64.deb

I'd download both and see which one works, sometimes there are dependency conflicts. Everything behind the hyphen is the package version, so only some packaging has changed, which could be remedied pretty well.

Now you've got all packages that were removed. Put them on an USB stick and put it into your Ubuntu machine.

You can now attempt to install them from a terminal. Open one and cd to the USB (somewhere in /media/<username>/, if automounted). Now, run the following command:

sudo dpkg -i *.deb

It is important to install all packages in one go (I substituted all the names by the asterisk), as to avoid dependency problems between the downloaded packages. If you are lucky, the packages will install without any problems and you will have your internet back after a reboot.

If not, and dependency (/-version) problems occur, you may have to put in some more work. At this point you might as well decide for a reinstallation of the system, if you can afford to set it up anew.

If you reach this point without successful restoration of the uninstalled packages, and you don't want to reinstall, this will involve package editing. I'll write further, if necessary...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .