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:
4
Answers
Thanks for interesting.
So, I ended up with this solution
1-
2-
3-
4- (Optional; sure, if not exist before)
5-
6-
7-
Ref: https://dotnet.microsoft.com/en-us/download/dotnet/7.0
Tough
.NET 7 RC 1
has been released. However, regardingLinux Runtime
compatibility there is not official guideline yet. Furthermore, here is theopen 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:Clean machine
(Haven't installed dotnet before
)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.Suggested Commnad:
As per your scenario, you could follow below command as suggested
here
:You could check details here in official GitHub thread.
Go to https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-7.0.100-linux-x64-binaries and follow the instruction. Just installed on Ubuntu 22.04
Do not forget to update the shell profile as indicated in the instructions
p.s. I started the service and in my case I had to replace /usr/bin/dotnet with /root/dotnet/dotnet
Had the similar issues when wanted to migrate the 2 projects from .NET 6 to .NET 7 on Ubuntu 22.04.1 with frustrating errors like
dotnet-sdk-7.0
NOT found or it is not release candidate (also got the same errors foraspnetcore-runtime-7.0
anddotnet-runtime-7.0
).As I understood later I had machine with Mixed-state according to this link.
The only solution which helped me it is Solution 3 from Microsoft documentation Ubuntu 22.04 troubleshooting (don’t know why Solution 2 did not work for me). Below I wrote what I do:
/etc/apt/preferencesList
file withsudo nano
and paste the next content in it:dotnet-sdk-7.0
correctlynet6.0
withnet7.0
inExecStart
for service files related to the 2 projects (in/etc/systemd/system/
folder)