skip to Main Content

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

enter image description here

2

Answers


  1. 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.

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search