About a year ago I've posted on the lxc-users
mailing-list how I've managed to successfully compile and
run LXD on Devuan Jessie (the same applies to Debian Jessie).
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.
# apt-get install golang-go liblxc1To 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 -bonce compiled the files have to be copied in the right directory in /usr/local/:
$ mkdir /usr/local/share/pkgconfig $ cp -a lxc.pc /usr/local/share/pkgconfig $ cp -ar src/lxc /usr/local/includeLinking liblxc.so to liblxc.so.1.2.0 is also needed to let the linker 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
$ cd /usr/src $ wget https://linuxcontainers.org/downloads/lxd/lxd-2.0.3.tar.gz $ tar -zxvf lxd_2.0.3.tar.gzcopy my prepared debian directory 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/controlso prepare packages:
$ dpkg-buildpackage -bif 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.debIf you need some help drop me an email, or better post on lxc mailing list and I'll be happy to try to help you.