如果我跑
docker run -it --rm --entrypoint=/bin/bash fedora:latest
dnf install moreutils
有用。
如果我运行:
19:57:34:~/ $ docker run -it --rm --entrypoint=/bin/bash public.ecr.aws/lambda/provided:al2023
bash-5.2# dnf install moreutils
dnf install moreutils
Downloading metadata...
error: No package matches 'moreutils'
bash-5.2#
事实并非如此。为什么?
这些说明参考 AL2:https://stackoverflow.com/questions/37951437/installing-moreutils-on-ec2-instance,不适用于 Al2023,并且启用建议的存储库似乎也没有做任何有用的事情:
22:46:20:~/ $ docker run -it --rm --entrypoint=/bin/bash public.ecr.aws/lambda/provided:al2023
bash-5.2# dnf --enablerepo epel install moreutils
dnf --enablerepo epel install moreutils
error: repo epel not found
bash-5.2#