Last upgrade crashes network manager (no internet connection, no applet)

While upgrading today, something caused my wireless network manager to disappear. Not even connecting via wired connection.

This error is being shown by files:

**(nm-applet:2716): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files 

(nm-applet:2716): nm-applet-WARNING **: Error connecting to ModemManager: Error calling StartServiceByName for org.freedesktop.ModemManager1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid 

(nm-applet:2716): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries 

(nm-applet:2716): nm-applet-WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files 

Is there a patch I can download through windows and send through to my ubuntu, or is it a case of having to reload everything? I tried running two versions back but still no internet access.


Solution 1:

Cause

This is caused by a regression introduced with a fix for libnl3 bug #1511735.
Resulting network-manager crash has been reported in network-manager bug #1539513 or network-manager bug #1539634


Solution

Downgrade libnl packages and wait for an upgrade of network-manager package


Step 1

Try to downgrade libnl with apt-get as in @Max answer:

sudo apt-get install libnl-3-200=3.2.21-1 libnl-route-3-200=3.2.21-1 libnl-genl-3-200=3.2.21-1

Step 2

If Step 1 fails,
because the packages aren't anymore in your cache and obviously cannot be downloaded by package manager, you need to downgrade libnl packages manually (download + install):

  • Download and copy them to your system
    [ from booting a live distrib/rescue cd or from another computer + usb stick ]
    Download links for amd64: libnl libnl-genl libnl-route
    Download links for i386: libnl libnl-genl libnl-route

  • Back to your system, where you saved these .deb files, install them with dpkg:

    sudo dpkg -i libnl-*.deb
    

Step 3

Now you should be able to (re)start NetworkManager and bring back networking:

sudo service network-manager restart

Notice

These bugs hits ubuntu trusty 14.04 with Pre-released updates : trusty-proposed Software Updates properties

Where last update of libnl packages from version 3.2.21-1 to 3.2.21-1ubuntu1 introduced a regression causing network-manager to crash


There isn't yet any upgrade on network-manager in trusty-proposed
Current version: 0.9.8.8-0ubuntu7.2

An update of network-manager is now available in trusty-proposed
Updated version: 0.9.8.8-0ubuntu7.3
please test proposed package (#1539634 comment n°11)


Thus until an upgrade for it triggers on your package manager you should apply a "hold" - as mentioned in libnl3 bug #1511735 comment n°29:

sudo apt-mark hold libnl-3-200 libnl-genl-3-200 libnl-route-3-200

Once the future upgrade from trusty-proposed is installed you can remove that hold with:

sudo apt-mark unhold libnl-3-200 libnl-genl-3-200 libnl-route-3-200

Which then will allow you to upgrade again libnl

Solution 2:

As of 2016-05-13 this libnl bug is affecting also users without trusty-proposed, who will almost certainly be directed here by Google.

Updated libnl and network-manager packages have already been released, so I recommend a forward upgrade.

Enable Network Manually

Assuming you are using a wired connection, eth0and a network with DHCP enabled, configure your network interface using a terminal:

sudo ifconfig eth0 up
sudo dhclient eth0

Update network-manager

With the network up and running, do an update either using Software Updater or from the terminal using apt-get.

Option A: Software Updater

Run Software Updater and update normally. At the time of writing fixed packages have already been released.

Option B: apt-get

(untested). If you want to minimize moving parts or do not have a graphical interface, you can also update from the terminal:

sudo apt-get update
sudo apt-get install network-manager

Solution 3:

In addition to the given solution I want to give a general advice.

Turn off the "proposed" repository

It is not supposed to be turned on. This "problem" affected only those users who turned on the proposed repository and installed a broken package.

This repository contains testing packages that are not recommended to install unless you want to test some specific packages.

enter image description here

Keep "proposed" off if you do not want this kind of surprises.

You can refer to this question for more information.