怎样编译安装snap

2023年4月14日 | 分类: 【技术】

https://forum.snapcraft.io/t/how-to-build-snapd-from-source-im-using-red-hat-enterprise-linux-8/12640
https://forum.snapcraft.io/t/how-to-build-snapd-from-source-im-using-red-hat-enterprise-linux-8/12640/2
git clone https://github.com/snapcore/snapd/
cd snapd
git checkout 2.59.1

报错:You are in ‘detached HEAD’ state.

参考:

sudo dnf builddep packaging/centos-8/snapd.spec -y

参考:https://amon.org/glibc-static
参考:https://amon.org/go-compiler

报错:

Error:
Problem: The operation would result in removing the following protected packages: systemd
(try to add ‘–allowerasing’ to command line to replace conflicting packages or ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

sudo dnf builddep packaging/centos-8/snapd.spec -y –nobest

rpmbuild -bb –build-in-place packaging/centos-8/snapd.spec

报错:

error: Bad source: /root/rpmbuild/SOURCES/snapd_2.59.only-vendor.tar.xz: No such file or directory

因为只有 2.59.1

git checkout 2.59.1

cd /root/rpmbuild/SOURCES/
wget https://github.com/snapcore/snapd/releases/download/2.59.1/snapd_2.59.1.only-vendor.tar.xz

然后正常编译?

然后怎么设置?