Bonjour,
J’aurai besoin des fichiers de développement LXC pour compiler lxc-python2 mais ces derniers ne sont pas disponibles dans les dépots (le paquet lxc-dev a disparu vers wheezy : packages.debian.org/search?keywords=lxc-dev).
J’ai déjà rencontré ce problème avec LXD que j’ai du abandonné à cause de ça, et maintenant Ansible, et globalement à chaque fois que j’essayais d’utiliser l’API de LXC. Ce qui me bloque totalement, n’ayant pas trouvé de contournement possible à ce problème.
Voici l’erreur que je rencontre quand j’essaye de lancer un pip install lxc-python2
[code]sudo pip install lxc-python2
Downloading/unpacking lxc-python2
Downloading lxc-python2-0.1.zip
Running setup.py (path:/tmp/pip-build-FAp5Tc/lxc-python2/setup.py) egg_info for package lxc-python2
Installing collected packages: lxc-python2
Running setup.py install for lxc-python2
building ‘_lxc’ extension
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lxc.c -o build/temp.linux-i686-2.7/lxc.o
lxc.c:27:30: fatal error: lxc/lxccontainer.h: Aucun fichier ou dossier de ce type
#include <lxc/lxccontainer.h>
^
compilation terminated.
error: command ‘i586-linux-gnu-gcc’ failed with exit status 1
Complete output from command /usr/bin/python -c “import setuptools, tokenize;file=’/tmp/pip-build-FAp5Tc/lxc-python2/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-12ibpf-record/install-record.txt --single-version-externally-managed --compile:
[/code]
Comme conseillé voici quelques infos sur ma Debian:
uname -a
Linux deuxfleurs.fr 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) i686 GNU/Linux
cat /etc/debian_version
stretch/sid
[code]cat /etc/apt/sources.list
deb http://ftp.fr.debian.org/debian testing main contrib non-free
deb-src http://ftp.fr.debian.org/debian testing main contrib non-free
deb http://ftp.debian.org/debian/ testing-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ testing-updates main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free
deb http://nightly.odoo.com/8.0/nightly/deb/ ./[/code]
[code]sudo lxc-checkconfig
Kernel configuration not found at /proc/config.gz; searching…
Kernel configuration found at /boot/config-3.16.0-4-686-pae
— Namespaces —
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled
— Control groups —
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
— Misc —
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
[/code]
apt-cache search lxc
ampache-common - web-based audio file management system common files
autopkgtest - automatic as-installed testing for Debian packages
libclxclient-dev - Development file for libclxclient
libclxclient3 - X Window System C++ access library
debian-handbook - reference book for Debian users and system administrators
imvirt - detects several virtualizations
imvirt-helper - helper programs to detect several virtualizations
libimvirt-perl - Perl module for detecting several virtualizations
libvirt-bin - programs for the libvirt library
libvirt-clients - programs for the libvirt library
libvirt-daemon - programs for the libvirt library
libvirt-daemon-system - Libvirt daemon configuration files
libvirt-dev - development files for the libvirt library
libvirt-doc - documentation for the libvirt library
libvirt-sanlock - library for interfacing with different virtualization systems
libvirt0 - library for interfacing with different virtualization systems
libvirt0-dbg - library for interfacing with different virtualization systems
python-libvirt - libvirt Python bindings
python3-libvirt - libvirt Python 3 bindings
lxc - Linux Containers userspace tools
lxc-dbg - Linux Containers userspace tools (debug)
lxctl - Utility to manage LXC
nova-compute-lxc - OpenStack Compute - compute node (LXC)
liboce-ocaf8 - OpenCASCADE Community Edition CAE platform shared library
yum-utils - Utilities based around the yum package manager
Merci d’avance pour vos lumières et votre indulgence, je dois certainement passer à côté de quelque chose vu la simplicité de mon problème…