LXD on Centos 7

Hello @stgraber ,
Sorry for reviving an old thread, but this seemed a bit relevant.

I have been trying to install LXD (3.0.4) on Centos 8 from source. I am facing an issue while using snap and need to build from source, can I please be helped on how I can do so? I tried to follow the instructions here (tools which are from Ubuntu, but I tried to use as many as I could for Centos).
I am stuck at this error:

checking for UV... no
configure: error: Package requirements (libuv >= 1.8.0) were not met:

Package 'libuv', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables UV_CFLAGS
and UV_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** [Makefile:40: deps] Error 1

But I do have libuv installed:

dnf install libuv
Last metadata expiration check: 2:43:29 ago on Fri 10 Jul 2020 10:05:01 PM EDT.
Package libuv-1:1.23.1-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Either way, can someone please point me to the right steps on how to install LXD 3.0.4 from source on Centos 8? TIA.


If it is really required, this is the error I get (while working on something and I do/can NOT disable SELinux ) when I use LXD installed via snap (this source):

 lxc start ready-frog
 2020/07/10 12:57:58.062876 cmd_run.go:918: WARNING: cannot create user data directory: failed to verify SELinux context of /root/snap: exit status 1
    cannot create SELinux context from context string kernel: Invalid argument

You’ll need the dev package for libuv, that’d probably be libuv-dev or something along those lines.

The error you’re getting appears to be snap related, you may want to report it at https://forum.snapcraft.io to see if this is known or if there is a way around it.

Thanks @stgraber. Now I get this. I read about this fix you posted, but it does not apply to 3.0.4 I guess. Any help? (I would rather install lxd from source rather than doing it via snap over which I would have no control unless I install snap from source)

configure: error: Package requirements (raft) were not met:

Package 'raft', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables RAFT_CFLAGS
and RAFT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** [Makefile:40: deps] Error 1

And yes, that error is snap related. I can try posting there, thank you, but I would still like some help in installing LXD from source on Centos 8!