- Newest
- Most votes
- Most comments
This issue appears to be related to SSL certificate problems when your Amazon Linux 2 instance is trying to access the package repositories. Here are some suggestions to resolve this:
-
Update your system's CA certificates: Run the following commands to update the CA certificates:
sudo yum install -y ca-certificates sudo update-ca-trust force-enable sudo update-ca-trust extract -
Check if your system time is correct: Although you mentioned checking the system time, it's worth double-checking as incorrect system time can cause SSL certificate validation failures. Use the following command to verify:
dateIf it's incorrect, you can sync it using:
sudo chronyd -q -
Verify DNS resolution: Ensure that your instance can resolve domain names correctly. Try pinging a known domain:
ping amazon.com -
Check your VPC settings: Ensure that your VPC has DNS hostnames and DNS resolution enabled. You can check this in the VPC console.
-
Try using a different mirror: You can try changing the mirror in your yum configuration. Edit the file
/etc/yum.repos.d/amzn2-core.repoand change the baseurl to a different region's mirror. -
As a last resort, you could temporarily disable SSL verification for yum: Edit
/etc/yum.confand addsslverify=falseunder the[main]section. However, this is not recommended for security reasons and should only be used as a temporary measure.
If none of these solutions work, you may need to contact AWS support for further assistance, as there might be an issue with your specific instance or the Amazon Linux 2 repositories.
Remember to revert any temporary changes once you've resolved the issue to ensure your system remains secure.
Sources
Amazon Linux 2 09/25/2018 release notes - Amazon Linux 2
Amazon Linux 2 version 2.0.20210813.1 release notes - Amazon Linux 2
Amazon Linux 2 version 2.0.20210701.0 release notes - Amazon Linux 2
answered a year ago
