Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instalation on Amazton Linux 2 not working #11

Open
udondan opened this issue Feb 28, 2022 · 2 comments
Open

Instalation on Amazton Linux 2 not working #11

udondan opened this issue Feb 28, 2022 · 2 comments

Comments

@udondan
Copy link

udondan commented Feb 28, 2022

The installation instructions do not mention AL explicitly so I'm not sure this is meant to work or is intentionally not supported. But since it's CentOS based I think it should work / should not be too complex to make work.

Following the installation instructions for CentOS, you will get this 404 error on Amazon Linux 2

$ sudo yum -y update
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                                               | 3.7 kB  00:00:00
!!!
https://aquasecurity.github.io/trivy-repo/rpm/releases/2/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.

Or maybe it's a general problem as described in aquasecurity/trivy#471?

@udondan
Copy link
Author

udondan commented Feb 28, 2022

So the problem is the release version. If you replace $releasever (2 on AL2) with a 7 (what AL2 is based on) the repo perfectly works. Maybe it should just be added to the docs.

baseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/$releasever/$basearch/
baseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/7/$basearch/

@oallauddin
Copy link

oallauddin commented Apr 4, 2023

@udondan
Can we use the same trick for Amazon Linux 2022?
From what I could find Amazon Linux 2022 is based off Fedora and not RedHat.
https://dev.to/aws-builders/whats-different-about-amazon-linux-2022-ilb

cat /etc/os-release
NAME="Amazon Linux"
VERSION="2022"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2022"
PLATFORM_ID="platform:al2022"
PRETTY_NAME="Amazon Linux 2022"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2022"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2022"
SUPPORT_END="2027-11-01"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants