I am following below commands to install .NET Core 2.1 SDK
Enable Microsoft PPA
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
Installing .NET Core 2.1 SDK
sudo apt update
sudo apt install apt-transport-https
sudo apt install dotnet-sdk-2.1
I already have .NET 8 installed in wsl ubuntu 20.04,
I get following error when I execute the command:
sudo apt install dotnet-sdk-2.1
root@LP003060:/mnt/c/nitin/JavaCallCSharp_new# sudo apt install dotnet-sdk-2.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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-host-8.0 : Conflicts: dotnet-host
dotnet-runtime-deps-2.1 : Depends: libssl1.0.0 but it is not installable or
libssl1.0.2 but it is not installable or
libssl1.1 but it is not installable
Depends: liblttng-ust0 but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
2
Answers
Uninstalled new version of .net And installed older one
I think your best bet would be to install another WSL distribution. One that was around when 2.1 was around. Ubuntu 16.04 I think would be a good option.
You can install this distribution alongside your current one, and remove it once you’re done.