[lxc-users] Running LXD on Jessie

Micky Del Favero micky at mesina.net
Sat Jul 23 09:24:22 UTC 2016


Micky Del Favero <micky at mesina.net> writes:

> In the last few days I've managed to setup lxd on Devuan Jessie
> (http://devuan.org/) but the same applied to Debian Jessie, I think it
> may be helpful to other and so I'll explain what I've done.

During last year some things changed and people asked me how to compile
LXD 2.x on Jessie, so I'm explaining how to do it (you can read it also
at: http://micky.it/log/compiling-lxd-on-devuan.html).  

*Preparatory actions*

First of all golang compiler and lxc library have to be installed from
backports in order to be able to compile LXD:

  # apt-get install golang-go liblxc1

To successfully compile LXD also some headers and a pkgconfig's file
have to be installed in the system. Headers and pkgconfig's file are
prepared getting lxc's sources from backports and compiling them:

  # apt-get source lxc
  # apt-get build-dep lxc
  $ cd /usr/src/lxc-2.0.0/
  $ dpkg-buildpackage -b

once compiled files have to be copied in the right directory in
/usr/local/:

  $ mkdir /usr/local/share/pkgconfig
  $ cp lxc.pc /usr/local/share/pkgconfig
  $ cp -ar src/lxc /usr/local/include

Linking liblxc.so to liblxc.so.1.2.0 it's also needed to let linker to
find the library, installed with liblxc1 package, during compilation:

  # cd /usr/lib/x86_64-linux-gnu/
  # ln -s liblxc.so.1.2.0 liblxc.so

*LXD compiling and packaging*

Download LXD sources (v.2.0.3 at the time of writing) and untar them:

  $ cd /usr/src
  $ wget https://linuxcontainers.org/downloads/lxd/lxd-2.0.3.tar.gz
  $ tar -zxvf lxd_2.0.3.tar.gz

copy my prepared debian directory
(https://github.com/mickydelfavero/devuan-lxd) in sources's one and
update changelog and control files:

  $ cd lxd-2.0.3
  $ tar -xvf ../lxd-debian.tar
  $ $EDITOR debian/changelog
  $ $EDITOR debian/control

so prepare packages:

  $ dpkg-buildpackage -b

if all is ok in /usr/src there will be five packages ready to be
installed:

   176286  golang-github-lxc-lxd-dev_2.0.3_all.deb
     4408  lxc2_2.0.3_all.deb
  4058778  lxd_2.0.3_amd64.deb
  1836780  lxd-client_2.0.3_amd64.deb
  1354034  lxd-tools_2.0.3_amd64.deb

Ciao, Micky
-- 
The sysadmin has all the answers, expecially "No"


More information about the lxc-users mailing list