无法在亚马逊上安装 syslog-ng linux 2

Unable to install syslog-ng on amazon linux 2

我已经从 L=amazon linux 2 AMI 启动了 EC2 实例。

我正在尝试使用 yum 安装 syslog-ng,但出现错误。

使用的命令:

$ sudo amazon-linux-extras install epel -y
$ sudo yum install syslog-ng

$ sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng321/repo/epel-7/czanik-syslog-ng321-epel-7.repo"
$ sudo yum install --enablerepo=epel --assumeyes syslog-ng

但我在这两种情况下都收到以下错误:

    Loaded plugins: dkms-build-requires, extras_suggestions, langpacks, priorities, update-motd
215 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package syslog-ng.x86_64 0:3.23.1-1.el6 will be installed
--> Processing Dependency: libmaxminddb.so.0()(64bit) for package: syslog-ng-3.23.1-1.el6.x86_64
--> Processing Dependency: libpcre.so.0()(64bit) for package: syslog-ng-3.23.1-1.el6.x86_64
--> Running transaction check
---> Package libmaxminddb.x86_64 0:1.2.0-1.el7 will be installed
---> Package syslog-ng.x86_64 0:3.23.1-1.el6 will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: syslog-ng-3.23.1-1.el6.x86_64
--> Finished Dependency Resolution
Error: Package: syslog-ng-3.23.1-1.el6.x86_64 (copr:copr.fedorainfracloud.org:czanik:syslog-ng323epel6)
           Requires: libpcre.so.0()(64bit)
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
cloud-init-19.3-44.amzn2.noarch has missing requires of rsyslog

尝试了特定的包并且能够安装。

$ sudo yum --enablerepo=epel -y install syslog-ng-3.5.6-3.el7.x86_64

我一年前写了这些说明:https://www.syslog-ng.com/community/b/blog/posts/installing-syslog-ng-in-amazon-linux-2-including-graviton2

我现在没有任何 AWS 账户,但如果它们不起作用,我会尝试获得一个...

**Update:**

首先:我仔细检查了你的报告。您提到为 EPEL 7 syslog-ng 3.21 添加一个 repo,但是下面的错误是关于 EPEL 6 的 syslog-ng 3.23。

好的,我可以访问了。我按照自己的说明进行操作并且有效:

[ec2-user@ip-xxx ~]$ syslog-ng -V
syslog-ng 3 (3.29.1)
Config version: 3.29
Installer-Version: 3.29.1
Revision: 
Compile-Date: Aug 29 2020 08:27:16
Module-Directory: /usr/lib64/syslog-ng
Module-Path: /usr/lib64/syslog-ng
Include-Path: /usr/share/syslog-ng/include
Available-Modules: add-contextual-data,affile,afprog,afsocket,afstomp,afuser,appmodel,basicfuncs,cef,confgen,cryptofuncs,csvparser,dbparser,disk-buffer,examples,graphite,hook-commands,json-plugin,kvformat,linux-kmsg-format,map-value-pairs,pseudofile,sdjournal,stardate,syslogformat,system-source,tags-parser,tfgetent,timestamp,xml,azure-auth-header,http
Enable-Debug: off
Enable-GProf: off
Enable-Memtrace: off
Enable-IPv6: on
Enable-Spoof-Source: on
Enable-TCP-Wrapper: on
Enable-Linux-Caps: on
Enable-Systemd: on

[ec2-user@ip-xxx ~]$ cat /etc/os-release 
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

并尝试了最新版本 (3.35),同样有效。