iman23
March 12, 2021, 6:38pm
1
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
simos
(Simos Xenitellis)
March 12, 2021, 6:57pm
2
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
iman23
March 12, 2021, 7:31pm
3
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
simos
(Simos Xenitellis)
March 12, 2021, 8:41pm
4
iman23:
# which lxc
/usr/bin/lxc
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.
iman23
March 12, 2021, 9:05pm
5
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 !