docs
docs copied to clipboard
Update .NET docs on Ubuntu now that .NET is available in default distro repos
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.
- ID: 80707602-f283-e796-d3b8-3287fbc011dc
- Version Independent ID: 1d732b15-9e64-633a-000c-ad96d9d3818a
- Content: Install .NET on Ubuntu - .NET
- Content Source: docs/core/install/linux-ubuntu.md
- Product: dotnet
- Technology: dotnet-install
- GitHub Login: @adegeo
- Microsoft Alias: adegeo
cc @mirespace
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?
Sorry, I don't. Hopefully @mirespace does.
Hi! Let's go with the Ubuntu commands:
- 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)
- 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.