ssl 无法在Amazon Linux上安装snapd

vbopmzt1  于 2023-10-19  发布在  Linux
关注(0)|答案(1)|浏览(149)

我有一个Nextjs应用程序,我成功地部署在Amazon Ec2示例上。我配置了我的DNS指向IP。现在我想在示例中使用certbot安装ssl证书。
我用this guide from certbot webiste itself
但我被困在安装snapd继续指南。使用sudo yum install snapd命令安装snapd时,显示以下依赖性错误:

[ec2-user@ip-172-31-21-133 collaboratorDashboard]$ sudo yum install snapd
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
236 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package snapd.x86_64 0:2.55.3-1.el7 will be installed
--> Processing Dependency: snap-confine(x86-64) = 2.55.3-1.el7 for package: snapd-2.55.3-1.el7.x86_64
--> Processing Dependency: snapd-selinux = 2.55.3-1.el7 for package: snapd-2.55.3-1.el7.x86_64
--> Processing Dependency: fuse for package: snapd-2.55.3-1.el7.x86_64
--> Processing Dependency: squashfs-tools for package: snapd-2.55.3-1.el7.x86_64
--> Processing Dependency: squashfuse for package: snapd-2.55.3-1.el7.x86_64
--> Running transaction check
---> Package fuse.x86_64 0:2.9.2-11.amzn2 will be installed
---> Package snap-confine.x86_64 0:2.55.3-1.el7 will be installed
---> Package snapd-selinux.noarch 0:2.55.3-1.el7 will be installed
--> Processing Dependency: selinux-policy >= 3.13.1-268.el7_9.2 for package: snapd-selinux-2.55.3-1.el7.noarch
--> Processing Dependency: selinux-policy-base >= 3.13.1-268.el7_9.2 for package: snapd-selinux-2.55.3-1.el7.noarch
--> Processing Dependency: policycoreutils-python for package: snapd-selinux-2.55.3-1.el7.noarch
---> Package squashfs-tools.x86_64 0:4.3-0.21.gitaae0aff4.amzn2.0.1 will be installed
--> Processing Dependency: liblzo2.so.2()(64bit) for package: squashfs-tools-4.3-0.21.gitaae0aff4.amzn2.0.1.x86_64
---> Package squashfuse.x86_64 0:0.1.102-1.el7 will be installed
--> Processing Dependency: squashfuse-libs(x86-64) = 0.1.102-1.el7 for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libfuseprivate.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libsquashfuse.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libzstd.so.1()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Running transaction check
---> Package libzstd.x86_64 0:1.5.2-1.amzn2 will be installed
---> Package lzo.x86_64 0:2.06-8.amzn2.0.4 will be installed
---> Package policycoreutils-python.x86_64 0:2.5-22.amzn2 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-2 for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-9 for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libselinux-python for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-22.amzn2.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-22.amzn2.x86_64
---> Package snapd-selinux.noarch 0:2.55.3-1.el7 will be installed
--> Processing Dependency: selinux-policy >= 3.13.1-268.el7_9.2 for package: snapd-selinux-2.55.3-1.el7.noarch
--> Processing Dependency: selinux-policy-base >= 3.13.1-268.el7_9.2 for package: snapd-selinux-2.55.3-1.el7.noarch
---> Package squashfuse-libs.x86_64 0:0.1.102-1.el7 will be installed
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.1-3.amzn2.1 will be installed
---> Package checkpolicy.x86_64 0:2.5-6.amzn2 will be installed
---> Package libcgroup.x86_64 0:0.41-21.amzn2 will be installed
---> Package libselinux-python.x86_64 0:2.5-12.amzn2.0.2 will be installed
---> Package libsemanage-python.x86_64 0:2.5-11.amzn2 will be installed
---> Package python-IPy.noarch 0:0.75-6.amzn2.0.1 will be installed
---> Package setools-libs.x86_64 0:3.3.8-2.amzn2.0.2 will be installed
---> Package snapd-selinux.noarch 0:2.55.3-1.el7 will be installed
--> Processing Dependency: selinux-policy >= 3.13.1-268.el7_9.2 for package: snapd-selinux-2.55.3-1.el7.noarch
--> Processing Dependency: selinux-policy-base >= 3.13.1-268.el7_9.2 for package: snapd-selinux-2.55.3-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: snapd-selinux-2.55.3-1.el7.noarch (epel)
           Requires: selinux-policy-base >= 3.13.1-268.el7_9.2
           Installed: selinux-policy-targeted-3.13.1-192.amzn2.6.8.noarch (installed)
               selinux-policy-base = 3.13.1-192.amzn2.6.8
           Available: selinux-policy-minimum-3.13.1-166.amzn2.5.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-166.amzn2.5
           Available: selinux-policy-minimum-3.13.1-166.amzn2.9.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-166.amzn2.9
           Available: selinux-policy-minimum-3.13.1-192.amzn2.6.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6
           Available: selinux-policy-minimum-3.13.1-192.amzn2.6.1.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.1
           Available: selinux-policy-minimum-3.13.1-192.amzn2.6.2.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.2
           Available: selinux-policy-minimum-3.13.1-192.amzn2.6.3.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.3
           Available: selinux-policy-minimum-3.13.1-192.amzn2.6.5.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.5
           Available: selinux-policy-minimum-3.13.1-192.amzn2.6.7.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.7
           Available: selinux-policy-minimum-3.13.1-192.amzn2.6.8.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.8
           Available: selinux-policy-mls-3.13.1-166.amzn2.5.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-166.amzn2.5
           Available: selinux-policy-mls-3.13.1-166.amzn2.9.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-166.amzn2.9
           Available: selinux-policy-mls-3.13.1-192.amzn2.6.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6
           Available: selinux-policy-mls-3.13.1-192.amzn2.6.1.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.1
           Available: selinux-policy-mls-3.13.1-192.amzn2.6.2.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.2
           Available: selinux-policy-mls-3.13.1-192.amzn2.6.3.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.3
           Available: selinux-policy-mls-3.13.1-192.amzn2.6.5.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.5
           Available: selinux-policy-mls-3.13.1-192.amzn2.6.7.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.7
           Available: selinux-policy-mls-3.13.1-192.amzn2.6.8.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.8
           Available: selinux-policy-targeted-3.13.1-166.amzn2.5.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-166.amzn2.5
           Available: selinux-policy-targeted-3.13.1-166.amzn2.9.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-166.amzn2.9
           Available: selinux-policy-targeted-3.13.1-192.amzn2.6.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6
           Available: selinux-policy-targeted-3.13.1-192.amzn2.6.1.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.1
           Available: selinux-policy-targeted-3.13.1-192.amzn2.6.2.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.2
           Available: selinux-policy-targeted-3.13.1-192.amzn2.6.3.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.3
           Available: selinux-policy-targeted-3.13.1-192.amzn2.6.5.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.5
           Available: selinux-policy-targeted-3.13.1-192.amzn2.6.7.noarch (amzn2-core)
               selinux-policy-base = 3.13.1-192.amzn2.6.7
Error: Package: snapd-selinux-2.55.3-1.el7.noarch (epel)
           Requires: selinux-policy >= 3.13.1-268.el7_9.2
           Installed: selinux-policy-3.13.1-192.amzn2.6.8.noarch (installed)
               selinux-policy = 3.13.1-192.amzn2.6.8
           Available: selinux-policy-3.13.1-166.amzn2.5.noarch (amzn2-core)
               selinux-policy = 3.13.1-166.amzn2.5
           Available: selinux-policy-3.13.1-166.amzn2.9.noarch (amzn2-core)
               selinux-policy = 3.13.1-166.amzn2.9
           Available: selinux-policy-3.13.1-192.amzn2.6.noarch (amzn2-core)
               selinux-policy = 3.13.1-192.amzn2.6
           Available: selinux-policy-3.13.1-192.amzn2.6.1.noarch (amzn2-core)
               selinux-policy = 3.13.1-192.amzn2.6.1
           Available: selinux-policy-3.13.1-192.amzn2.6.2.noarch (amzn2-core)
               selinux-policy = 3.13.1-192.amzn2.6.2
           Available: selinux-policy-3.13.1-192.amzn2.6.3.noarch (amzn2-core)
               selinux-policy = 3.13.1-192.amzn2.6.3
           Available: selinux-policy-3.13.1-192.amzn2.6.5.noarch (amzn2-core)
               selinux-policy = 3.13.1-192.amzn2.6.5
           Available: selinux-policy-3.13.1-192.amzn2.6.7.noarch (amzn2-core)
               selinux-policy = 3.13.1-192.amzn2.6.7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Things I have already tried

我已经尝试使用this answer解决这个问题,方法是删除selinux-policy-base并重新安装它,但重新安装会引发更多的依赖性问题。
我还启用了certbot网站中提到的继续发布,但这不会改变任何东西x1c 0d1x
以下是我的操作系统发布信息:

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
yr9zkbsy

yr9zkbsy1#

Snap不是安装Certbot的唯一方法,但它只是首选方法。
我通过安装Certbot与Pip解决了这个问题。
从官方Certbot文档:

  1. sudo dnf install python3 augeas-libs
    1.删除任何以前安装的Certbot
  2. sudo python3 -m venv /opt/certbot/ && sudo /opt/certbot/bin/pip install --upgrade pip
  3. sudo /opt/certbot/bin/pip install certbot certbot-nginx
  4. sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot
    给你

相关问题