简体   繁体   English

我尝试安装的 Yum 依赖项没有提供程序

[英]Yum dependency I'm trying to install doesn't have a provider

One of the dependencies of the rlwrap package I'm trying to install doesn't have a provider.我尝试安装的 rlwrap 包的依赖项之一没有提供程序。 Is there a command line option I can pass to the install to let it forget about the perl(File::Slurp) dependency?有没有我可以传递给安装程序的命令行选项,让它忘记 perl(File::Slurp) 依赖项?

package: rlwrap-0.45.2-2.el8.x86_64
  dependency: /usr/bin/perl
   provider: perl-interpreter-4:5.26.3-421.el8.x86_64
  dependency: /usr/bin/python3
   provider: python36-3.6.8-38.module+el8.5.0+12207+5c5719bc.x86_64
   provider: python38-3.8.13-1.module+el8.7.0+15641+2ece4388.x86_64
   provider: python39-3.9.13-2.module+el8.7.0+17195+44752b34.x86_64
  dependency: libc.so.6(GLIBC_2.15)(64bit)
   provider: glibc-2.28-211.el8.x86_64
  dependency: libreadline.so.7()(64bit)
   provider: readline-7.0-10.el8.x86_64
  dependency: libtinfo.so.6()(64bit)
   provider: ncurses-libs-6.1-9.20180224.el8.x86_64
  dependency: libutil.so.1()(64bit)
   provider: glibc-2.28-211.el8.x86_64
  dependency: libutil.so.1(GLIBC_2.2.5)(64bit)
   provider: glibc-2.28-211.el8.x86_64
  dependency: perl(:VERSION) >= 5.6.0
   provider: perl-libs-4:5.26.3-421.el8.i686
   provider: perl-libs-4:5.26.3-421.el8.x86_64
  dependency: perl(AutoLoader)
   provider: perl-interpreter-4:5.26.3-421.el8.x86_64
  dependency: perl(Carp)
   provider: perl-Carp-1.42-396.el8.noarch
  dependency: perl(Config)
   provider: perl-interpreter-4:5.26.3-421.el8.x86_64
  dependency: perl(Data::Dumper)
   provider: perl-Data-Dumper-2.167-399.el8.x86_64
  dependency: perl(Exporter)
   provider: perl-Exporter-5.72-396.el8.noarch
  dependency: perl(File::Slurp)
  dependency: perl(Getopt::Std)
   provider: perl-interpreter-4:5.26.3-421.el8.x86_64
  dependency: perl(POSIX)
   provider: perl-interpreter-4:5.26.3-421.el8.x86_64
  dependency: perl(RlwrapFilter)
   provider: rlwrap-0.45.2-2.el8.x86_64
  dependency: perl(constant)
   provider: perl-constant-1.33-396.el8.noarch
  dependency: perl(lib)
   provider: perl-interpreter-4:5.26.3-421.el8.x86_64
  dependency: perl(strict)
   provider: perl-libs-4:5.26.3-421.el8.i686
   provider: perl-libs-4:5.26.3-421.el8.x86_64
  dependency: perl(vars)
   provider: perl-interpreter-4:5.26.3-421.el8.x86_64
  dependency: rtld(GNU_HASH)
   provider: glibc-2.28-211.el8.i686
   provider: glibc-2.28-211.el8.x86_64

I have installed the perl(File::Slurp) dependency separately.我已经单独安装了 perl(File::Slurp) 依赖项。 For reference, this is the command I am using to install the rlwrap package and error:作为参考,这是我用来安装 rlwrap 包和错误的命令:

yum install rlwrap
Last metadata expiration check: 0:41:10 ago on Thu Dec 22 16:38:35 2022.
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides perl(File::Slurp) needed by rlwrap-0.45.2-2.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

I have tried the suggestions from the yum output.我已经尝试了 yum 输出中的建议。

I was wrong about EPEL having all the dependencies.我对 EPEL 具有所有依赖项的看法是错误的。 It looks like perl-File-Slurp lives in the "AppStream" repository.看起来perl-File-Slurp Slurp 位于“AppStream”存储库中。 You can add the the CentOS 8 version of that repository to your ubi8 image:您可以将该存储库的 CentOS 8 版本添加到您的 ubi8 映像中:

  1. Install dnf if you haven't already:如果你还没有安装dnf

     microdnf install dnf
  2. Add the repository configuration (note that I have this disabled by default):添加存储库配置(请注意,我默认禁用此功能):

     cat > /etc/yum.repos.d/centos-appstream.repo <<'EOF' [appstream] name=CentOS Stream $releasever - AppStream mirrorlist=http://mirrorlist.centos.org/?release=$releasever-stream&arch=$basearch&repo=AppStream&infra=$infra gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial EOF
  3. Install the CentOS 8 GPG key:安装 CentOS 8 GPG 密钥:

     rpm --import https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
  4. Enable the EPEL repository if you haven't already:如果您还没有启用 EPEL 存储库:

     dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  5. Install rlwrap :安装rlwrap

     dnf --enablerepo=appstream install rlwrap

Alternately, instead of installing rlwrap and it's myriad dependencies, just install socat :或者,不要安装rlwrap和它的无数依赖项,只需安装socat

microdnf install socat

And then use the readline and exec connectors:然后使用readlineexec连接器:

socat readline exec:"/path/to/some/program --arg foo",pty

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM