Cannot install .Net Core 2.2 on UBuntu 18.04

I was trying to deploy an ASP.NET Core 2.2 application to a DigitalOcean droplet running Ubuntu 18.04. I followed the steps provided on the official document. https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-current.

But I am getting the error.

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dotnet-sdk-2.2 : Depends: aspnetcore-runtime-2.2 (>= 2.2.0) but it is not going to be installed
                  Depends: dotnet-runtime-2.2 (>= 2.2.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Any help? I tried to get help from other forums and SO answer still no luck.

this is a known issue on GitHub

Developers have suggested different solutions as per my knowledge. I Suggest you to check the link.

The problem generally happends on the lack of libicu** where ** is the version of libicu.

Below is the suggested solution for version Dotnet Core Sdk dotnet-sdk-2.2

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.2

.NET Core SDK 2.2 on Linux Ubuntu 18.04: Unable to , NET Core SDK 2.2 on Linux Ubuntu 18.04: Unable to locate package The install instructions here don't work on Ubuntu 18.04.1. sudo apt-get  Cannot install .Net Core 2.2 on UBuntu 18.04. Posted on July 3, 2019 Written by The Curator

I had this same problem. The above fix didn't really work for me. I had to download and install libicu57 and libssl1.0.0 for the command to run and install dotnet successfully. libicu57- https://pkgs.org/download/libicu57 libssl1.0.0 -https://pkgs.org/download/libssl1.0.0

Download the specific version number dotnet requires, yours might be different.

After installing, run sudo apt-get install dotnet-sdk-2.2 Hope this helps.

Install .NET Core on Ubuntu, After installing libicu55 , you need to install the other package dependencies that won't install on their own: sudo apt-get install  Install .NET Core SDK or .NET Core Runtime on Ubuntu. 06/04/2020; 21 minutes to read; In this article.NET Core is supported on Ubuntu. This article describes how to install .NET Core on Ubuntu. When an Ubuntu version falls out of support, .NET Core is no longer supported with that version.

solution here Download and install libicu..

18.04 - Cannot install .NET Core on Ubuntu Bionic Beaver, on Visual Studio Code. This software also includes IntelliSense and debugging. sudo apt-get install dotnet-sdk-2.2 Check .NET Core Version Now that the installation is completed, and I will check the installed .NET Core version using the line below

Linux Software Repository for Microsoft Products, Install the DotNet Core on Ubuntu 18.04, so you can build your apps on the open sudo apt-get update sudo apt-get install dotnet-sdk-2.2. I'm currently trying to install .NET Core on Ubuntu 18.04 following these instructions. But I always get the following message: me@mine-Ubuntu:~$ sudo apt-get install -y dotnet-sdk-2.1.200 [sudo]

.NET Core on Linux. A New Way to Save Money, NET Core SDK 2.2 on Ubuntu (because the instructions on Microsoft the instructions, you may find that you still could not install the latest . This article describes how to use a package manager to install .NET Core on Ubuntu 18.04. Installare l'SDK (che include il runtime) se si desidera sviluppare app .NET Core.Install the SDK (which includes the runtime) if you want to develop .NET Core apps. Install the SDK (which includes the runtime) if you want to develop .NET Core apps.

How to install DotNet Core on Ubuntu 18.04, In this article, I am going to show you how to install and get started with . NET core is not available in the official package repository of Ubuntu 18.04 LTS. sudo apt install dotnet-sdk-2.2 How to List Installed Packages in Ubuntu 20.04 · How to Mount NFS File System in Ubuntu 20.04 · Meaning of Error: Could Not Get  Finally, install DotNet Core with these commands: sudo apt-get update sudo apt-get install dotnet-sdk-2.2. After running the last command, it will take some time to populate the local package

Comments
  • I followed the exact step you provided but only changed on the last command for version 2.2: sudo apt-get install dotnet-sdk-2.2 and it worked for me. You could update your answer with this change. Maybe helpful for others too. Thank you.
  • I see this issue asks about ubuntu 18.04 specifically, but I didn't pay attention to having a different version and the code didn't work for me until I updated the sources.list.d modification to the ubuntu release I have. It would be helpful if that was pointed out.