AmazonLinux2 with .Net 6, PowerShell, Mono and Mate Desktop - packages-microsoft-com-prod still set to centos 7 repo directory, AMI should update to point to fedora

0

Im trying to understand why the Amazon Linux 2 with .Net 6 AMI has not been updated to use different Microsoft repositories. The Microsoft docs for 'Installing .Net on Linux' indicate that '.NET is no longer supported on CentOS Linux. As of June 30th, 2024, CentOS Linux reached end-of-life.'

I only realized the image is still pointing to the Microsoft centos 7 repo when I tried to install aspnetcore-runtime-8.0 and dotnet-sdk-8.0 and noticed its not in the Microsoft centos 7 repo nor in the Microsoft rhel 7 repo that are the 2 Microsoft repos provided with that image. Should the image be updated to point to one of the Microsoft fedora repos? If I browse the Microsoft fedora 38+ repos I can see the version 8.0 packages of aspnetcore-runtcme and dotnet-sdk available in there.

When I run 'yum repolist' I can see 2 Microsoft repositories. The first Microsoft repo is repo-id and repo-name of 'packages-microsoft-com-prod' which has a repo-baseurl of 'https://packages.microsoft.com/centos/7/prod' and repo-filename of '/etc/yum.repos.d/microsoft-prod.repo'. The second Microsoft repo is repo-id and repo-name 'packages-microsoft-rhel-prod' with repo-baseurl of 'https://packages.microsoft.com/rhel/7/prod' with repo-filename of '/etc/yum.repos.d/microsoft.repo'.

asked 8 months ago178 views
1 Answer
0

Thank you for bringing this to attention. You're correct in observing that the Amazon Linux 2 AMI with .NET 6 is still using repositories that point to CentOS 7, which is approaching end-of-life.

The Amazon Linux 2 AMI with .NET Core has indeed been updated several times since its initial release. However, it appears that the repository configuration for Microsoft packages has not been updated to reflect the changes in CentOS support and availability of newer .NET versions.

You're right to question this, as it does present potential issues for users trying to install newer versions of .NET, such as .NET 8.0, which are not available in the CentOS 7 or RHEL 7 repositories.

Ideally, the AMI should be updated to use more current repositories, such as the Fedora repositories you mentioned, which do contain the newer .NET versions. This would allow users to install and use the latest .NET SDKs and runtimes without having to manually reconfigure the repositories.

However, it's important to note that Amazon Linux 2 is based on Red Hat Enterprise Linux (RHEL), not Fedora, so simply switching to Fedora repositories may not be the best solution. A more appropriate update might involve pointing to RHEL 8 or newer repositories, or to repositories specifically maintained for Amazon Linux 2.

As for why this hasn't been updated yet, it's possible that maintaining compatibility with existing deployments or specific versions of .NET Core has been a priority. However, given the approaching end-of-life for CentOS 7, an update to the repository configuration does seem necessary.

If you need to use .NET 8.0 or other newer versions not available in the current repositories, you may need to manually update the repository configuration or consider using a more recent Amazon Linux version, such as Amazon Linux 2023, which might have more up-to-date package repositories.

It would be advisable to reach out to AWS support or create a feature request to have this issue addressed in future AMI updates. This would ensure that the AMI remains current and continues to meet the needs of developers using .NET on Amazon Linux 2.
Sources
Amazon Linux 2 AMI with .NET Core now includes Mono
Amazon Linux 2 AMI with .NET Core updated to .NET Core 3.0
Release: Elastic Beanstalk Amazon Linux 2 platform updates on October 06, 2023 - AWS Elastic Beanstalk

profile picture
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions