大网数据广告活动
服务器运维问答

Problems when install perl package

· 52CE 我爱测

I am using Red hat (Red Hat Enterprise Linux release 8.2 (Ootpa) - 4.18.0-193.14.3.el8_2.x86_64). When I install perl package by using rpm package and command dnf install perl-libs-5.26.3-419.el8.x86_64.rpm . But it requests - no…

问题原文

原帖链接 · MiSFhE · CC BY-SA 4.0

I am using Red hat (Red Hat Enterprise Linux release 8.2 (Ootpa) - 4.18.0-193.14.3.el8_2.x86_64). When I install perl package by using rpm package and command dnf install perl-libs-5.26.3-419.el8.x86_64.rpm. But it requests

 - nothing provides perl(Carp) needed by perl-libs-4:5.26.3-419.el8.x86_64
 - nothing provides perl(Encode) needed by perl-libs-4:5.26.3-419.el8.x86_64
 - nothing provides perl(Exporter) needed by perl-libs-4:5.26.3-419.el8.x86_64

So, I install perl (Carp) but it still asks for perl(Exporter), then I install perl(Exporter), It asks for perl(Carp).

  - nothing provides perl(:MODULE_COMPAT_5.26.3) needed by perl-Exporter-5.72-396.el8.noarch
  - nothing provides perl(strict) needed by perl-Exporter-5.72-396.el8.noarch
  - nothing provides perl(warnings) needed by perl-Exporter-5.72-396.el8.noarch
  - nothing provides perl(:VERSION) >= 5.6.0 needed by perl-Exporter-5.72-396.el8.noarch
  - nothing provides perl(Carp) >= 1.05 needed by perl-Exporter-5.72-396.el8.noarch

Is there any ways I can install perl by pkg or something else locally (I can push file to server but no way from server to the internet)?

已采纳解答

原帖链接 · Nadia Espinosa · CC BY-SA 4.0

I think the best option to install a package and ensure all the dependencies are ok, is implement a local repository, this is an offline method to solve the problem.

To execute this procedure, you need to follow the next steps.

First you need to upload the OS ISO to the machine or attach it as an external disk. Once the ISO is on the server, you need to mount as a FS, with the following command.

mount RHEL8.2.iso /mnt/

NOTE: For the command above, please replace the path and name or your specific ISO.

When the ISO is mounted, you need to especified to the OS that you want to implement a local repo, this will be done moving all the files on /etc/yum.repos.d/

mv /etc/yum.repos.d/*.repo /tmp/

Create a new file on the path above specifying the local repo.

vi /etc/yum.repos.d/local.repo

With the following:

[LocalRepo_BaseOS]
name=LocalRepository_BaseOS
baseurl=file:///cdrom/BaseOS
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
     
[LocalRepo_AppStream]
name=LocalRepository_AppStream
baseurl=file:///cdrom/AppStream
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Now you need to clean the yum repo.

yum clean all

And load the new repo.

yum repolist

BR.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-06-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。