内核是kernel5.10,使用snap安装的certbot会提示:
cannot change profile for the next exec call: No such file or directory
检查了链接都没问题,目测可能是兼容性问题,已经把脚本换到用pip安装了。
解决办法:
apparmor_parser --add /var/lib/snapd/apparmor/profiles/snap.certbot.*
CertBot运行语句改写为:
snap refresh core && apparmor_parser --add /var/lib/snapd/apparmor/profiles/snap.certbot.* && certbot --nginx --no-redirect --register-unsafely-without-email