Install LXC version 3.2.1 in ubuntu 18.04 server

hi
I need to install LXC version 3.2.1 in my ubuntu 18.04 server
I was follow this steps :

# git clone https://github.com/lxc/lxc
# cd lxc
# git checkout lxc-3.2.1 -b remotes/origin/stable-3.0
# ./autogen.sh
# ./configure
# make
# make install
# lxc-ls --version
3.0.3

Why lxc version is not 3.2.1 ?

Thanks

Hi!

Most likely your system still has the package lxc-utils installed. This package is the distribution’s LXC client utilities. You can remove with

sudo apt remove lxc-utils

To verify that you have the right lxc-ls in your $PATH, run

which lxc-ls

thanks you simos

i was testing in clear & clean bionic without any additional packages

# apt-get install -y make git
# apt-get install -y libtool m4 automake pkg-config
# apt-get install -y libvirt0 libpam-cgfs bridge-utils uidmap
# apt policy lxc-utils
lxc-utils:
  Installed: (none)
  Candidate: 3.0.3-0ubuntu1~18.04.
...
# apt-get remove --purge lxcfs
# apt policy lxc
lxc:
  Installed: (none)
  Candidate: 3.0.3-0ubuntu1~18.04.1
...
# git clone https://github.com/lxc/lxc
# cd lxc
# git checkout lxc-3.2.1 -b remotes/origin/stable-3.0
# ./autogen.sh
# ./configure
# make
# echo $?
0
# make install
# lxc-ls --version
3.0.3
# which lxc-ls
/usr/local/bin/lxc-ls

Here you tested for the lxc executable, which is a the client software for LXD (yes, can be counter-intuitive sometimes). Ubuntu comes with LXD pre-installed, and Ubuntu 18.04 has LXD 3.0.3.

You can remove the LXD tools (hence, the lxc utility) by running

sudo apt remove lxd-tools

Here is a comparison between LXC and LXD, Comparison between LXC and LXD – Mi blog lah! It looks like you have a specific need for LXC. In general I suggest to users to go for LXD as it is more user-friendly.

Thanks you simos for your replay

# dpkg -S $(which lxc)
lxd-client: /usr/bin/lxc

The package is lxd-client, not lxd-tools

# apt policy lxd-tools
lxd-tools:
  Installed: (none)
  Candidate: 3.0.3-0ubuntu1~18.04.1

# cd lxc
# src/lxc/lxc-ls --version
3.2.1
# src/lxc/.libs/lxc-ls --version
3.0.3
# md5sum /usr/local/bin/lxc-ls src/lxc/.libs/lxc-ls
c12fd2a343d600d1b25b257c66c22450  src/lxc/.libs/lxc-ls
c12fd2a343d600d1b25b257c66c22450  /usr/local/bin/lxc-ls

I think there is a problem in makefile !

Yes of course, i can copy src/lxc/.libs/lxc-ls and other files to /usr/local/bin and problem will be solve, BUT this is not a safe way !

Somebody can help me ?