1.下载源码
git clone git://github.com/lxc/lxc
2.运行配置脚本,编译安装
cd lxc/
./autogen.sh
make && make install
3.运行lxc相关命令测试:
lxc-info
4.相关问题
运行命令遇到:
lxc-info: error while loading shared libraries: liblxc.so.1: cannot open shared object file: No such file or directory
解决:
ldd /usr/local/bin/lxc-info
linux-vdso.so.1 => (0x00007fff65afe000)
liblxc.so.1 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f70e808f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f70e8474000)
ln -s /usr/local/lib/liblxc.so.1.2.0 /lib/liblxc.so.1