如何使用 yum 在 CentOS 上安装 perl(Unix::Syslog)?

How to install perl(Unix::Syslog) on CentOS using yum?

当我安装某个应用程序时,我得到 perl(Unix::Syslog) 作为依赖包。

perl(Unix::Syslog) is needed by 

我尝试将其安装为 yum install 'perl(Unix::Syslog)',但结果如下。

No package perl(Unix::Syslog) available.
Error: Nothing to do

我尝试使用 RPM 安装它,但它提供了更多依赖项列表。

所以他们最好的原因是使用 yum 安装,但我找不到方法来做到这一点。

Edit : 其实我也试过 yum install perl-Unix-Syslog 但结果是一样的。可能是我没有在我的 CentOS 中配置正确的存储库。

所以我在谷歌上搜索并找到了下面的修复方法,但它没有解决问题。

yum --enablerepo=extras install epel-release

尝试; perl-Unix-Syslog

yum info perl-unix-syslog
Available Packages
Name        : perl-Unix-Syslog
Arch        : x86_64
Version     : 1.1
Release     : 3.el6
Size        : 28 k
Repo        : epel
Summary     : Perl interface to the UNIX syslog(3) calls
URL         : http://search.cpan.org/dist/Unix-Syslog/
License     : Artistic 2.0
Description : This module provides an interface to the system logger syslogd(8) via
            : Perl's XSUBs. The implementation attempts to resemble the native libc-
            : functions of your system, so that anyone being familiar with syslog.h
            : should be able to use this module right away.

您也可以通过http://rpm.pbone.net

找到它

如果您缺少存储库,请将其添加到您的 /etc/yum/repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

您可能还需要做; yum clean all 在重试安装之前清除缓存和镜像列表。