docs icon indicating copy to clipboard operation
docs copied to clipboard

Update .NET docs on Ubuntu now that .NET is available in default distro repos

Open omajid opened this issue 2 years ago • 4 comments

Certain versions of .NET are now available in the default repositories on certain versions of Ubuntu.

We should probably update the .NET install docs to reflect how to "correctly" install .NET. Otherwise, it's possible users will pick up an incorrect mix of packages, or pick up packages from the Ubuntu feed when they want it from the Microsoft feed (or the other way around).

We suggest using the distro-only packages for CentOS (Stream), Fedora and RHEL already.

Do we also need to update https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-mixup for Ubuntu?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

omajid avatar Aug 02 '22 14:08 omajid

cc @mirespace

omajid avatar Aug 02 '22 14:08 omajid

Hi @omajid I'm opening up a PR to handle a bunch of different changes in the install docs. Do you have a link to the ubuntu information so I can make sure I rewrite the content appropriately?

adegeo avatar Aug 07 '22 21:08 adegeo

Sorry, I don't. Hopefully @mirespace does.

omajid avatar Aug 08 '22 14:08 omajid

Hi! Let's go with the Ubuntu commands:

  1. https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu

Install the sdk

sudo apt-get install dotnet6 or sudo apt-get install dotnet-sdk-6.0

Install the runtime

  • For ASP.NET Core Runtime sudo apt-get install aspnetcore-runtime-6.0
  • For .NET Runtime without ASP.NET Core support: sudo apt-get install dotnet-runtime-6.0

Dependencies

Adding the following to the list:

 libgcc-s1 (for 22.x)
 libicu70 (for 22.04)
 liblttng-ust1 (for 22.x)
 libssl3 (for 22.x)
 libunwind-13 (for 22.x)
 libunwind8 (for 22.x)
  1. https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-mixup

Solutions

  • For 1:
sudo apt-get remove packages-microsoft-prod
sudo apt-get update
sudo apt-get remove dotnet6
sudo apt-get autoremove
sudo apt-get install dotnet6
  • For 2:
cat > /etc/apt/preferences.d/microsoft-prod << EOF
Package: dotnet* aspnet* netstandard*
Pin: origin "packages.microsoft.com"
Pin-Priority: -10
EOF
sudo apt-get remove dotnet6
sudo apt-get autoremove
sudo apt-get install dotnet6
  • For 3:
cat > /etc/apt/preferences.d/microsoft-prod << EOF
Package: dotnet* aspnet* netstandard*
Pin: origin "packages.microsoft.com"
Pin-Priority: 999
EOF
sudo apt-get remove dotnet6
sudo apt-get autoremove
sudo apt-get install dotnet6

Please, let me know if I missed something more needed.

mirespace avatar Aug 09 '22 11:08 mirespace