[lxc-users] lxc-ls question

Stéphane Graber stgraber at ubuntu.com
Sun Feb 23 21:06:32 UTC 2014


On Sun, Feb 23, 2014 at 09:59:16PM +0200, Kevin Wilson wrote:
> Hello,
> My question is about lxc.1.0:
> 
> I want first to verify that my understanding is correct:
> lxc-ls, which is a python script, is created both when using
> --enable-python and when not using --enable-python in ./configure.
> And in fact, --enable-python is not needed so that it will work.
> 
> Please let me know if I am correct in this (and I would appreciate if
> somebody will elaborate about what is --enable-python for).
> 
> Second, I have a Fedora 20 x86_64 machine on which docker is
> installed; as part of
> docker rpm installation, it installs lxc 0.9.
> 
> I want to do tests with lxc-1.0 on this machine without
> removing docker, so I had installed lxc-1.0 from the tar file
> from http://linuxcontainers.org/downloads/
> 
> I had run this:
> ./configure --enable-python  --prefix=/test
> make && make install
> export PATH=/test/bin:$PATH
> export LD_LIBRARY_PATH=/test/lib
> 
> lxc-ls
> Traceback (most recent call last):
>   File "/test/bin/lxc-ls", line 31, in <module>
>     import lxc
> ImportError: No module named 'lxc'
> I also tried without --enable-python (though it seems to me not needed at all):
> 
> ./configure   --prefix=/test
> make && make install
> export PATH=/test/bin:$PATH
> export LD_LIBRARY_PATH=/test/lib

All options are enabled by default if the requirements for the option
are met.

Since you appear to have the python3 headers installed on your system,
--enable-python or not, the result is the same and the configuration
output at the end of the configure script should tell you as much.

To disable python3 and instead get the shell lxc-ls replacement, you
need to pass --disable-python to configure.

> 
> 
> lxc-ls
> Traceback (most recent call last):
>   File "/test/bin/lxc-ls", line 31, in <module>
>     import lxc
> ImportError: No module named 'lxc'
> 
> Any ideas ?
> I would appreciate if somebody will test it on his machine (Ubunut/other) and
> tell me it does work (and on which distro and the distro version)
> 
> Kevin
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140223/03b05741/attachment.pgp>


More information about the lxc-users mailing list