Skip to content

Building

Douglas Kosovic edited this page Mar 19, 2020 · 21 revisions

This page will show all the required steps primarily on Ubuntu 20.04 (or earlier) to build and install NetworkManager-l2tp, although it has interspersed notes that are applicable to other Linux distributions and versions.

Note: the backslash characters \ that appear in the below examples are shell line continuation characters that are safe to copy and paste to the command-line.

Prerequisites

Issue the following on the command-line to install the prerequisite build-time and run-time packages :

sudo apt install \
build-essential \
git \
intltool \
libtool \
network-manager-dev \
libnm-dev \
libnma-dev \
ppp-dev \
libdbus-glib-1-dev \
libsecret-1-dev \
libgtk-3-dev \
libglib2.0-dev \
libssl-dev \
libnss3-dev \
libxml2-utils \
xl2tpd \
strongswan

Note: libnma is only available and needed on NetworkManager 1.2 and later based Linux distributions.

Versions of Ubuntu earlier than 19.10 may also need the following dependencies:

sudo apt install libnm-util-dev libnm-glib-dev libnm-glib-vpn-dev

Obtain the source code

We'll use Git to obtain the latest copy of the source code and then cd into the top level directory (which the subsequent examples assume) :

git clone https://github.com/nm-l2tp/network-manager-l2tp.git
cd network-manager-l2tp

Note: if you are using a NetworkManager < 1.8 based Linux distribution (e.g Ubuntu 16.04), switch to the nm-1-2 branch with the following:

git checkout nm-1-2 

if you are using an older NetworkManager 0.9.8 or 1.0 based Linux distribution, switch to the nm-1-0 branch with the following:

git checkout nm-1-0 

Configuration

As mentioned in the README.md file, issue the following on Ubuntu (AMD64, i.e. x86-64):

./autogen.sh
./configure \
  --disable-static --prefix=/usr \
  --sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu \
  --libexecdir=/usr/lib/NetworkManager \
  --localstatedir=/var \
  --with-pppd-plugin-dir=/usr/lib/pppd/2.4.7

Note: if you are using 32bit Ubuntu or Ubuntu 14.04 (and earlier), remove --libdir=/usr/lib/x86_64-linux-gnu from the above.

Note: for some other Linux distributions' configure examples, see the README.md file.

Building

Issue the following :

make

Installation

Issue the following :

sudo make install
Clone this wiki locally