I've been trying to download netcore 2.2 on ubuntu, Ive tried with apt and I have no luck I get the package not found error.
I also tried downloading the binaries and registering the path but it doesn't seem to work. Is it just not possible at all?
.NET Core 2.2 was End of Life'd in Dec 2019. So Microsoft doesn't produce packages .NET Core 2.2 for recent versions of Linux distributions, including Ubuntu 20.04. Only 2.1 and 3.1, the currently supported versions, are available for Ubuntu 20.04.
If you want to install them, you should try a manual install:
Go to the main download site: https://dotnet.microsoft.com/download/dotnet-core
Click "Out of support versions". That should show you a table. Click on 2.2, which should take you to: https://dotnet.microsoft.com/download/dotnet-core/2.2
Click on the "x64" under the "Binaries" table of the release: https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-2.2.207-linux-x64-binaries
Follow the steps on that page to extract the downloaded tarball and "install" it:
mkdir -p $HOME/dotnet && tar xf dotnet-sdk-2.2.207-linux-x64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
I am going to repeat the warnings you will see on the download site: This is an old version of .NET Core which has many unpatched security vulnerabilities that are now public. You do not want to deploy an application to production using .NET Core 2.2. Upgrade to 3.1 or downgrade to 2.1 instead.
In my case, I already had versions installed through APT.
As I had to work on some projects that still use .NET Core 2.2, I just copied the contents of the $HOME/dotnet/sdk/2.2.207
(this version may be different on your machine) and $HOME/dotnet/shared/*
folders to /usr/share/dotnet
.
With bash, I've used this commands:
sudo cp -r ~/dotnet/sdk/* /usr/share/dotnet/sdk/
sudo cp -r ~/dotnet/host/* /usr/share/dotnet/host/
sudo cp -r ~/dotnet/shared/* /usr/share/dotnet/shared/
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