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 following errer even after updating & Upgrading ubuntu
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.
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
Now you can run commands to install the new dotnet-host (on dotnet 8) and dotnet-sdk.
sudo apt-get update
sudo apt-get install -y dotnet-host
sudo apt-get install -y dotnet-sdk-8.0
If you get any conflicts on install with existing installed packages, you have to uninstall those packages first.
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