Install .net 7.x
os:Ubuntu 18.04.3 LTS
# lsb_release -a
LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Before you install .NET, You may first run sudo apt update to refresh cache. Follow the installation instructions for Ubuntu as follow:
Step 1: Releases Index
https://github.com/dotnet/core
Releases Index -- Index for all release channels in JSON format
Step 2: Index for all release channels in JSON format
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json
output
"releases-index": [
{
"channel-version": "8.0",
"latest-release": "8.0.0-preview.1",
"latest-release-date": "2023-02-21",
"security": false,
"latest-runtime": "8.0.0-preview.1.23110.8",
"latest-sdk": "8.0.100-preview.1.23115.2",
"product": ".NET",
"release-type" : "lts",
"support-phase": "active",
"eol-date": null,
"releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json"
},
{
"channel-version": "7.0",
"latest-release": "7.0.3",
"latest-release-date": "2023-02-14",
"security": true,
"latest-runtime": "7.0.3",
"latest-sdk": "7.0.200",
"product": ".NET",
"release-type" : "sts",
"support-phase": "active",
"eol-date": "2024-05-14",
"releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"
},
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json
{
"channel-version": "7.0",
"latest-release": "7.0.3",
"latest-release-date": "2023-02-14",
"latest-runtime": "7.0.3",
"latest-sdk": "7.0.200",
"release-type" : "sts",
"support-phase": "active",
"eol-date": "2024-05-14",
"lifecycle-policy": "https://aka.ms/dotnetcoresupport",
"releases": [
{
"release-date": "2023-02-14",
"release-version": "7.0.3",
"security": true,
"cve-list": [
{
"cve-id": "CVE-2023-21808",
"cve-url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-21808"
}
],
"release-notes": "https://github.com/dotnet/core/blob/main/release-notes/7.0/7.0.3/7.0.3.md",
"runtime": {
"version": "7.0.3",
"version-display": "7.0.3",
"vs-version": "17.5.0, 17.4.5",
"vs-mac-version": "17.4.5",
"files": [
{
"name": "dotnet-runtime-linux-arm.tar.gz",
"rid": "linux-arm",
"url": "https://download.visualstudio.microsoft.com/download/pr/d5489c60-2a6a-46da-a8d4-e216e929ed58/b50cc86b9b6d2346611f2a0caeefcdc8/dotnet-runtime-7.0.3-linux-arm.tar.gz",
"hash": "e26aa9caef1b75d7d2fdf48b40ec941347a24f9f2862f54af8dce8447931ff9ae319bfb955a86c2375c79df35731f3c6d6c642dcf5f7726c49e4fc6668ae2fa5"
},
find download url link as dotnet-sdk-linux-x64.tar.gz
"sdk": {
"version": "7.0.202",
"version-display": "7.0.202",
"runtime-version": "7.0.4",
"vs-version": "17.5.2",
"vs-mac-version": "17.5.2",
"vs-support": "Visual Studio 2022 (v17.5)",
"vs-mac-support": "Visual Studio 2022 for Mac (v17.5)",
"csharp-version": "11.0",
"fsharp-version": "7.0",
"vb-version": "16.9",
"files": [
{
"name": "dotnet-sdk-linux-arm.tar.gz",
"rid": "linux-arm",
"url": "https://download.visualstudio.microsoft.com/download/pr/6b56da47-dbe4-4921-a08e-eb3826565525/36ecf89507f52cc70ec2128b13948290/dotnet-sdk-7.0.202-linux-arm.tar.gz",
"hash": "242c3b93b6ca39e89a7f30f0c29d71294200a2eb14a95bd3f017ed0cb83f3c5ecc6a0d0b0ffab3687d1f925419619a8508f96d1262bd522f6c876a75d929e88a"
},
...
{
"name": "dotnet-sdk-linux-x64.tar.gz",
"rid": "linux-x64",
"url": "https://download.visualstudio.microsoft.com/download/pr/bda88810-e1a6-4cf0-8139-7fd7fe7b2c7a/7a9ffa3e12e5f1c3d8b640e326c1eb14/dotnet-sdk-7.0.202-linux-x64.tar.gz",
"hash": "f415a8e6c078421759a963aa0b232c092ecf2f0a8e014ba72092390aac792ed35e8f3c822b2ce91ed636cdee9342bba2b89fb4fdfd2d28dbb0ac856d828cb29f"
},
https://github.com/dotnet/core/blob/main/release-notes/7.0/7.0.4/7.0.4.md
https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.203/dotnet-sdk-7.0.203-linux-x64.tar.gz
wget "https://download.visualstudio.microsoft.com/download/pr/bda88810-e1a6-4cf0-8139-7fd7fe7b2c7a/7a9ffa3e12e5f1c3d8b640e326c1eb14/dotnet-sdk-7.0.202-linux-x64.tar.gz"
sudo tar zxf dotnet-sdk-7.0.202-linux-x64.tar.gz -C /usr/share/dotnet
rm packages-microsoft-prod.deb
Uninstall .Net 7.x on Ubuntu 18.04(aliyun)
step 1:
sudo apt remove dotnet-sdk-7.0 dotnet-runtime-7.0 aspnetcore-runtime-7.0
How to Install .NET6 or 7 in Ubuntu 22.04 | 20.04, Debian 11/10 & Other Linux
https://fostips.com/ubuntu-22-04-net-6-how-to-install-other-linux/