1

Is it possible for runtime .NET Core 3.1 and 6.0 to coexist on an Ubuntu system (for example, Ubuntu 22.04)?

Let me explain, I have a computer where I need both runtimes, but either I install one or the other. I can't seem to get them to work together. The installation for version 3.1 is done like this:

wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb  
dpkg -i packages-microsoft-prod.deb  
apt update  
apt install apt-transport-https dotnet-runtime-3.1 -y 

And for version 6.0, I use the following steps:

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt install aspnetcore-runtime-6.0

However, when I run dotnet --list-runtimes, I only see version 3.1. If I only perform the installation of 6.0, only that one is displayed. But never both.

Fco Javier Balón
  • 1,144
  • 2
  • 11
  • 31
  • 1
    My usual remark: don't just download over HTTP a package and then install it with dpkg -i: it can't be validated cryptographically. Instead, add back the previous version's repository (possibly adjust preferences: man apt_preferences), so it can be downloaded using apt and be verified to not have been tampered with. I'm talking here about package libssl1.1 – A.B Aug 31 '23 at 10:46

0 Answers0