英文:
Unable to install perl module in docker file
问题
I am trying to build a lambda layer with Perl support using this prebuilt docker image: https://metacpan.org/pod/AWS::Lambda#Use-Pre-built-Docker-Images
Now I am trying to add this library libtext-roman-perl into the docker image with:
FROM shogo82148/p5-aws-lambda:base-5.36.al2
RUN yum install -y libtext-roman-perl
COPY handler.pl /var/task/
CMD [ "handler.handle" ]
but it is showing No package libtext-roman-perl available.
Is this because there is no repository containing this library in the environment?
I've tried yum update but it does not resolve this
英文:
I am trying to build a lambda layer with Perl support using this prebuilt docker image: https://metacpan.org/pod/AWS::Lambda#Use-Pre-built-Docker-Images
Now I am trying to add this library libtext-roman-perl into the docker image with:
FROM shogo82148/p5-aws-lambda:base-5.36.al2
RUN yum install -y libtext-roman-perl
COPY handler.pl /var/task/
CMD [ "handler.handle" ]
but it is showing No package libtext-roman-perl available.
Is this because there is no repository containing this libray in the environment?
I've tried yum update but it does not resolve this
答案1
得分: 3
yum install
是 Fedora/RedHat/CentOS 安装软件包的方式。这些项目使用 perl-Foo-Bar
命名约定来打包 Perl 模块。因此,你可以尝试:
RUN yum install -y perl-Text-Roman
libfoo-bar-perl
是 Debian/Ubuntu 的命名约定。如果你使用这些发行版(但看起来你不是),那么你应该使用 apt
而不是 yum
来安装它。
RUN apt install libtext-roman-perl
英文:
yum install
is Fedora/RedHat/CentOS's way to install packages. These projects use the naming convention perl-Foo-Bar
for packaging Perl modules. So you could try:
RUN yum install -y perl-Text-Roman
libfoo-bar-perl
is the naming convention of Debian/Ubuntu. If you're using one of those distributions (but you don't seem to be), then you'd use apt
to install it instead of yum
.
RUN apt install libtext-roman-perl
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论