0

I know Linux Container (LXC) has an API. We can use it via liblxc, which should be a c library. But I cannot find any? So, how people use this API currently?

Xin Li
  • 139
  • 9

2 Answers2

0

If you installed lxc successfully, shared libraries & header files are copied to your environment. ex) /usr/local/include/lxc , /usr/local/lib/liblxc.so

then you can build your code within linking option '-llxc'

0

You need to install lxc-devel. Here's the information about this package.

# yum info lxc-devel
Loaded plugins: langpacks
Available Packages
Name        : lxc-devel
Arch        : x86_64
Version     : 1.0.7
Release     : 2.0.12.el7
Size        : 20 k
Repo        : ol7_latest/x86_64
Summary     : Development library for lxc
URL         : http://linuxcontainers.org
License     : LGPLv2+
Description : The lxc-devel package contains header files and library needed for
            : development of the Linux containers.
alvits
  • 6,550
  • 1
  • 28
  • 28