I’ve moved of my applications to .Net 8 and I use ubuntu 22.04.3 LTS VPS to host my web applications.
I’m trying to install .net 8 on the VPS but I can’t
I’ve tried the Scripted install by microsoft it didn’t work
I’ve tried the Debian install by microsoft it didn’t work
When I run the basic command for ubuntu
sudo apt-get update &&
sudo apt-get install -y dotnet-sdk-8.0
I get the follwing errer even after updating & Upgrading ubuntu
2
Answers
Was in the same boat and between multiple github posts for past releases was able to figure this out. Looks like dotnet-sdk-8.0 is not part of official linux package so have to jump through a few hoops.
First use "sudo apt-get remove" command to remove the currently installed dotnet-sdk, dotnet-runtime and dotnet-host.
Then run the following command to add microsoft package source.
Now you can run commands to install the new dotnet-host (on dotnet 8) and dotnet-sdk
If you get any conflicts on install with existing installed packages, you have to uninstall those packages first.
Thank you @Dmitri M.
First I saw a conflict againest "netstandard-targeting-pack-2.1-7.0" I wrote down this:
sudo apt-get remove netstandard-targeting-pack-2.1-7.0
Then run again all these:
sudo apt-get update
sudo apt-get install -y dotnet-host
sudo apt-get install -y dotnet-sdk-8.0