I cannot find a straightforward way of installing dotnet 2.2 on a AWS Linux 2 AMI.
There was some announcements that there was pre-built AMI's with it installed, but the ones I see, also have different versions of MSSQL Server.
Isn't there a way to install dotnet core 2.2 using yum or getting an AMI without SQL Server?
I found Run .NET programs on Amazon Linux AMI but I wonder if it is still valid, and if there is not an easier way.
Amazon Linux instances manage their software using the yum package manager. The yum package manager can install, remove, and update software, as well as manage all of the dependencies for each package.
The . NET Core runtime allows you to run applications on Linux that were made with . NET Core but didn't include the runtime. With the SDK you can run but also develop and build .
The following works for .NET Core 3.1 on Amazon Linux 2:
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-3.1
(or dotnet-sdk-5.0
for .NET 5)
More detail here: https://docs.microsoft.com/en-us/dotnet/core/install/linux-centos#centos-7-
If you're using AWS Elastic Beanstalk, and you only need the runtime (not the SDK) then you can just use the .NET Core / Linux platform.
Have you tried the following:
sudo yum update
sudo yum install dotnet-sdk-2.2
Also this link might help: https://dotnet.microsoft.com/download/linux-package-manager/centos/sdk-current
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With