I'm trying to use the NetworkManager library as a c++ library in order to add wifi support in a Linux app. I am using Ubuntu 14.04 LTS.

I've tried nmcli through command line, but calling it with the app is not stable enough and prefer to use a pure c++ library.

I downloaded NetworkManager version 1.4.2 "stable". After executing autogen.sh, and make & make install, the process ends successfully.

When I restart the machine, though, I can't access Internet. Neither with wired cable or with Wifi dongle.

Is this normal? What should I do if I want to use the library in my app?

Another problem detected is that in Settings/Network there is the following message "The system network services are not compatible with this verison".

I can't even use nmcli through command line anymore. This errors appears "nmcli: error while loading shared libraries: libnm.so.0: cannot open shared object file: No such file or directory"

Edit: nmcli is solved using this post https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux. It was needed to add the library path "/usr/local/lib.

Now I can scan for Wifi with nmcli in command line, but if I try to connect, this message appears: "Error: Connection activation failed:(53) The Wi-Fi network could not be found"

Any help would be much appreciated.

  • Possibly 1.4.2 is just too far upstream to be compatible with your system (even 16.04 only has 1.2.x afaik). You might have been better off adding the appropriate source code repository (deb-src) so that you could then have used apt-get to install the appropriate (matching) version of the package source for your system. – steeldriver Oct 25 '16 at 16:44
  • I think you're right @steeldriver. The 14.04 version is I will try to install this version and see what happens. – asantacreu Oct 26 '16 at 8:31
  • @steeldriver No luck.. I installed the version and after restarting my internet is gone :/ – asantacreu Oct 26 '16 at 10:53
  • Did you install 1.4.2 over system files (e.g. to /usr/ rather than, say, /usr/local)? Are you sure you were able to remove all traces of it? – steeldriver Oct 26 '16 at 12:16
  • I'm using a VirtualMachine. Made a safe copy before installing 1.4.2. Before attemting to install I had Internet. After the installation was complete, too. But after restarting the virtual machine, Internet gone. – asantacreu Oct 26 '16 at 12:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.