Home > Net >  How to Install ASP.NET Core Runtime 7.0.0-rc.1 on Ubuntu 22.04
How to Install ASP.NET Core Runtime 7.0.0-rc.1 on Ubuntu 22.04

Time:10-12

I have .NET6 runtime installed on Ubuntu 22.04

$ dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.9 [/usr/lib/dotnet/dotnet6-6.0.109/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.9 [/usr/lib/dotnet/dotnet6-6.0.109/shared/Microsoft.NETCore.App]

And tried to install ASP.NET Core Runtime 7.0.0-rc.1 but without any success. Any idea, please?

Ref:

CodePudding user response:

And tried to install ASP.NET Core Runtime 7.0.0-rc.1 but without any success. Any idea, please?

Tough .NET 7 RC 1 has been released. However, regarding Linux Runtime compatibility there is not official guideline yet. Furthermore, here is the open GitHub thread you can post your issue.

Up to now, for Ubuntu 22.04 dotnet-runtime-6.0 has official instructions where you should consider following scenarios:

  1. Clean machine (Haven't installed dotnet before)
  2. Mixed-state (Installed dotnet before but want to update`)

Note: Please consider your state first, depending on the scenario command might changed. For example, if you encounter any error on executing this command udo apt-get install -y aspnetcore-runtime-6.0 that scenario, you should replace with below command.

sudo apt-get install -y dotnet-runtime-6.0

Suggested Commnad:

As per your scenario, you could follow below command as suggested here:

sudo apt remove dotnet*
sudo apt remove aspnetcore*
sudo rm /etc/apt/sources.list.d/microsoft-prod.list*
sudo apt update
sudo apt install aspnetcore-runtime-6.0

You could check details here in official GitHub thread.

CodePudding user response:

Thanks for interesting.
So, I ended up with this solution

1-

curl https://download.visualstudio.microsoft.com/download/pr/0857e86d-4206-4c14-b814-e5e3424f8396/6e1113fce778ef9ff69eb2ffefd6de76/aspnetcore-runtime-7.0.0-rc.1.22427.2-linux-musl-x64.tar.gz -o aspnetcore-runtime-7.0.0-rc.1.22427.2-linux-musl-x64.tar.gz

2-

mkdir dotnet7-7.0.100-rc.1

3-

tar xvf aspnetcore-runtime-7.0.0-rc.1.22427.2-linux-musl-x64.tar.gz -C dotnet7-7.0.100-rc.1

4- (Optional; sure, if not exist before)

sudo mkdir /usr/lib/dotnet

5-

sudo cp -R dotnet7-7.0.100-rc.1 /usr/lib/dotnet/dotnet7-7.0.100-rc.1

6-

sudo ln -sf /usr/lib/dotnet/dotnet7-7.0.100-rc.1 /etc/alternatives/dotnet7rc1

7-

sudo ln -sf /usr/lib/dotnet/dotnet7-7.0.100-rc.1/dotnet /etc/alternatives/dotnet

Ref: https://dotnet.microsoft.com/en-us/download/dotnet/7.0

  • Related