3

So I need NetworkManager 1.0 on my Rpi to be able to setup new wifi connections via nmcli.

There is a package in experimental debian repo: https://packages.debian.org/network-manager

I made

$ sudo echo "deb http://ftp.debian.org/debian experimental main" >> /etc/apt/sources.list

Then

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get -t experimental -f install network-manager

And got

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 network-manager : Depends: libc6 (>= 2.17) but 2.13-38+rpi2+deb7u7 is to be installed
                   Depends: libgcrypt20 (>= 1.6.0) but it is not installable
                   Depends: libgnutls-deb0-28 (>= 3.3.0) but it is not going to be installed
                   Depends: libndp0 (>= 1.2) but it is not installable
                   Depends: libnl-3-200 (>= 3.2.21) but 3.2.7-4 is to be installed
                   Depends: libnl-genl-3-200 (>= 3.2.21) but 3.2.7-4 is to be installed
                   Depends: libnm0 (>= 1.0.0) but it is not going to be installed
                   Depends: libsystemd0 but it is not going to be installed
                   Depends: libteamdctl0 (>= 1.9) but it is not installable
                   Depends: libpam-systemd but it is not going to be installed
                   Recommends: ppp (>= 2.4.6) but it is not going to be installed
                   Recommends: iputils-arping but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Ok. I considered to try to compile sources. Downloaded NetworkManager-1.0.0.tar.xz and tried to ./configure. Another story about dependencies started.

echo "APT::Default-Release \"stable\";">> /etc/apt/apt.conf.d/50raspi
echo "deb http://ftp.ru.debian.org/debian testing main contrib" >> /etc/apt/sources.list
sudo apt-get install intltool
sudo apt-get install libdbus-1-dev libdbus-glib-1-dev
sudo apt-get install libgudev-1.0-0 libgudev-1.0-dev
sudo apt-get install libnl-3-200=3.2.24-2 libnl-3-dev=3.2.24-2 libnl-route-3-200=3.2.24-2 libnl-route-3-dev=3.2.24-2 libnl-genl-3-200=3.2.24-2 libnl-genl-3-dev=3.2.24-2
sudo apt-get install uuid uuid-dev
sudo apt-get install libreadline-dev libncurses5 libncurses5-dev
sudo apt-get install libnss3 libnss3-dev
sudo apt-get install ppp-dev
sudo apt-get install libndp-tools libndp-dev

And in the end it asked for libndp which lead me to

sudo apt-get -f install libc6=2.19-13

And i wasn't able to install it

Preparing to replace libc6:armhf 2.13-38+rpi2+deb7u7 (using .../libc6_2.19-13_armhf.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
/var/lib/dpkg/tmp.ci/preinst: 191: /var/lib/dpkg/tmp.ci/preinst: runlevel: not found
Unpacking replacement libc6:armhf ...
dpkg: warning: subprocess old post-removal script was killed by signal (Segmentation fault)
dpkg: trying script from the new package instead ...
dpkg: error processing /var/cache/apt/archives/libc6_2.19-13_armhf.deb (--unpack):
 subprocess new post-removal script was killed by signal (Segmentation fault)
dpkg: error while cleaning up:
 subprocess installed pre-installation script was killed by signal (Segmentation fault)
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.19-13_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any suggestions would be highly appreciated.

Finally i was able to build NetworkManager 1.0 from sources for clean raspbian "jessie".

Thanks @goldilocks for his suggestion about jessie, it saved few days for me:)

#leave only jessie in repos list
echo "deb http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi" > /etc/apt/sources.list

#Update packege repositories
sudo apt-get update
sudo apt-get upgrade

#Install packages for NetworkManager 1.0
sudo apt-get install -y intltool
sudo apt-get install -y libdbus-1-3 libdbus-1-dev libdbus-glib-1-2 libdbus-glib-1-dev
sudo apt-get install -y libgudev-1.0-0 libgudev-1.0-dev
sudo apt-get install -y libnl-3-200 libnl-3-dev libnl-route-3-200 libnl-route-3-dev libnl-genl-3-200 libnl-genl-3-dev
sudo apt-get install -y uuid uuid-dev
sudo apt-get install -y libreadline5 libreadline-dev libncurses5 libncurses5-dev
sudo apt-get install -y libnss3 libnss3-dev
sudo apt-get install -y ppp ppp-dev
sudo apt-get install -y libndp-tools libndp0 libndp-dev
sudo apt-get install -y dbus libdbus-glib-1-2 libdbus-glib-1-dev
sudo apt-get install -y gcc
sudo apt-get install -y python-gi python-dbus

#Build NetworkManager 1.0 from sources
wget http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/1.0/NetworkManager-1.0.0.tar.xz
tar -xJf NetworkManager-1.0.0.tar.xz
cd NetworkManager-1.0.0
./configure
make
make check
sudo make install

BUT it doesn't work because of dbus restrictions. It need to be setup properly. Sources do include dbus rules, but seems they were not installed into the system. I tried to install them and all i was able to find in the sources but no result. It do affected on the NetworkManager, but i was not able to get it working properly in the end.

  • 1
    Why can't you not modify the networking config files using an earlier version of network manager, via script or manually. You are likely to run into dependency problems no matter what approach you take to installing this package. It is in the experimental repo for a reason (it requires other packages/libraries not available in your current distro, it introduces backwards incompatibilities or is not stable). – Steve Robillard Feb 25 '15 at 13:23
  • This is my plan B:). Thanks for your suggestion. Currently i'm handling all network setup via handmade scripts which works through rest api. But i'm not happy how its going. I was excited when realized that i could delegate that stuff to network manager (especially wifi). Don't you have an example format of files to generate with scripts for network manager? – Serafim Suhenky Feb 25 '15 at 17:59
3
echo "deb http://ftp.debian.org/debian experimental main" >> /etc/apt/sources.list

>_<

That will never, ever accomplish anything, except possibly on a Pi 2, and even then it may be sketchy unless you have actually installed the ARMv7 version of Debian, which Raspbian is not.

Normal armhf debian is compiled for the ARMv7 architecture. This is NOT compatible with the A/B/A+/B+, which is why Raspbian, for the ARMv6 architecture, was necessary in the first place.

Unfortunately this is a bit confusing since both of these are tagged as armhf packages.

So, take that line out of sources.txt. I checked the raspbian "jessie" repos but the highest version of NM there is 0.9.10. I suggest if you want 1.0.0, build it from the source. It is not that big and should not take so long, even on the pi.

The general procedure for this should be:

wget https://download.gnome.org/sources/NetworkManager/1.0/NetworkManager-1.0.0.tar.xz
tar -xJf NetworkManager-1.0.0.tar.xz

You may get a complaint about xz not being available, apt-get install xz-utils (pretty sure that's it). Once this is unpacked:

cd NetworkManager-1.0.0
./configure 

You're probably going to get told you are missing something. E.g., if you haven't compiled anything on the pi, you first need a compiler, apt-get install gcc. After that there may be some libraries; to build against a library, you need the extra -dev package, e.g., libabc-dev, not just libabc. Once this finally passes:

make
make install

This will put it in /usr/local/, which should override the normal one -- double check /usr/local/bin is at the beginning of echo $PATH. You can also check with which nmcli.

  • Thanks for your answer! Please read my question till the end, I was trying to build from sources. It asks for some libs (libc6>=2.19-13 for example) that are not in raspberry repo. Should i try to build those libs from sources too? Wouldn't it be too complicated to build libc? – Serafim Suhenky Feb 25 '15 at 17:45
  • "ARMv6 architecture" - makes sense, thx – Serafim Suhenky Feb 25 '15 at 18:01
  • You can't easily rebuild libc6, that's the base of everything (literally, except the kernel). However, I just checked my raspbian "jessie" pi and that uses libc-2.19-13, so you can upgrade the whole system (I haven't had any problems because of it). – goldilocks Feb 25 '15 at 18:19

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.