core icon indicating copy to clipboard operation
core copied to clipboard

Add support for Ubuntu 22.04 (Jammy Jellyfish) - April 2022 Release Date

Open rbhanda opened this issue 2 years ago • 66 comments

This issue is created to track progress for the work to enable Ubuntu 22.04 support for .NET Core 3.1, .NET 5.0 and .NET 6.0

Product and Test updates

  • [x] All teams] Do a compatibility check for the product with the new OS
  • [x] [CoreCLR/CoreFX] Runtime / RID Support update
  • [x] [Infra] Ensure that the correct Docker images used by teams are built in the dotnet-buildtools-prereqs (if applicable)
  • [x] [Infra] Replace docker tags used in builds across repos and branches
  • [x] [CLI team] Update CI legs to latest updated Dockerfile
  • [x] [All teams] Update test infrastructure to support the new version
  • [x] [Acquisition] Add support within nightly repos
  • [ ] [Acquisition] Deploy to master (GA) during next patch release cycle

Release team:

  • [x] Notify .NET Core teams regarding new OS release
  • [x] Follow up with infra and add feed for new OS release to packages.microsoft.com
  • [x] Update release manifest files
  • [x] Create new Docker files to test the new OS
  • [ ] Update the supported OS content on GitHub and marketing sites.

Document updates:

  • [ ] Add OS prerequisites to the dependencies document
  • [ ] Update distro install page

rbhanda avatar Dec 14 '21 22:12 rbhanda

22.04 isn't expected to be released until April 2022.

mthalman avatar Dec 14 '21 22:12 mthalman

@wfurt if we have not started adding the RID, we should target to get those in as soon as possible for the April Release

rbhanda avatar Feb 10 '22 00:02 rbhanda

ok. I'll take look @rbhanda.

wfurt avatar Feb 15 '22 05:02 wfurt

@rbhanda - What is the status of this? If there are pending product changes that have not gone into April servicing, we will not be able to claim support on release day.

MichaelSimons avatar Mar 23 '22 18:03 MichaelSimons

We have already pushed last two updates to Ubuntu 22.04. We are ready to announce the added distro as supported with the April release. @dcwhittaker FYI for the April blog post

rbhanda avatar Mar 23 '22 19:03 rbhanda

Thanks for the update. There is the one unresolved Arm32 issue @mthalman found which is linked here. It's something to consider noting in any announcements.

MichaelSimons avatar Mar 23 '22 20:03 MichaelSimons

The arm32 issue is being fixed by https://github.com/dotnet/runtime/pull/67145 for .NET 6.0, porting to older releases is going to be problematic and people are leaning against doing so.

  • .NET 5 is near EOL - will go out of support 17 days after Ubuntu 22.04 release, will there be another .NET 5 release before that?
  • .NET Core 3.1 does not officially support OpenSSL 3.0 and porting the fix would require large changes.

If you have any concerns, feel free to raise them in https://github.com/dotnet/runtime/issues/66310.

rzikm avatar Mar 28 '22 07:03 rzikm

There is the one unresolved Arm32 issue @mthalman found which is linked here. It's something to consider noting in any announcements.

@rbhanda, @dcwhittaker note that in the current state (i.e. without the fix in https://github.com/dotnet/runtime/pull/67145), .NET is pretty much unusable on arm32 Ubuntu 22.04 (or any 32-bit platform with OpenSSL 3.0), as even the build commands like dotnet restore which download files over HTTPS will not work, just something to keep in mind for the blog post.

rzikm avatar Mar 28 '22 08:03 rzikm

Is installing OpenSSL 1.x an option on Ubuntu 22.04? .NET Core 3.1 (and newer) will work against that even on arm32, right? Could that be documented as a workaround?

omajid avatar Mar 28 '22 14:03 omajid

Is installing OpenSSL 1.x an option on Ubuntu 22.04? .NET Core 3.1 (and newer) will work against that even on arm32, right? Could that be documented as a workaround?

~~Unfortunately, @omajid, we prioritize OpenSSL 3.0 when looking for a suitable library version, so the workaround would have to somehow make sure that dotnet does not see OpenSSL 3.0 libs, which is either very hard or impossible for common users.~~

Edit, actually, there is environment variable for that: CLR_OPENSSL_VERSION_OVERRIDE, which can be used to point dotnet to older OpenSSL version, so setting it to 1.1 could work. (see https://github.com/dotnet/runtime/blob/main/src/native/libs/System.Security.Cryptography.Native/opensslshim.c#L56-L77)

rzikm avatar Mar 28 '22 15:03 rzikm

can not install from apt source yet.

ubuntu@ubuntu2204:~$ wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
--2022-03-29 14:31:18--  https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
Resolving packages.microsoft.com (packages.microsoft.com)... 13.75.64.135
Connecting to packages.microsoft.com (packages.microsoft.com)|13.75.64.135|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3692 (3.6K) [application/octet-stream]
Saving to: ‘packages-microsoft-prod.deb’

packages-microsoft-prod.deb                                               100%[==================================================================================================================================================================================>]   3.61K  --.-KB/s    in 0s

2022-03-29 14:31:18 (2.12 GB/s) - ‘packages-microsoft-prod.deb’ saved [3692/3692]



ubuntu@ubuntu2204:~$ sudo dpkg -i packages-microsoft-prod.deb
Selecting previously unselected package packages-microsoft-prod.
(Reading database ... 115636 files and directories currently installed.)
Preparing to unpack packages-microsoft-prod.deb ...
Unpacking packages-microsoft-prod (1.0-ubuntu22.04.1) ...
Setting up packages-microsoft-prod (1.0-ubuntu22.04.1) ...


ubuntu@ubuntu2204:~$ sudo apt-get update;   sudo apt-get install -y apt-transport-https &&   sudo apt-get update &&   sudo apt-get install -y dotnet-sdk-6.0
Hit:1 https://mirrors.aliyun.com/ubuntu jammy InRelease
Hit:2 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Hit:3 https://mirrors.aliyun.com/ubuntu jammy-updates InRelease
Hit:4 https://mirrors.aliyun.com/ubuntu jammy-backports InRelease
Hit:5 https://mirrors.aliyun.com/ubuntu jammy-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
apt-transport-https is already the newest version (2.4.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Hit:1 https://mirrors.aliyun.com/ubuntu jammy InRelease
Hit:2 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Hit:3 https://mirrors.aliyun.com/ubuntu jammy-updates InRelease
Hit:4 https://mirrors.aliyun.com/ubuntu jammy-backports InRelease
Hit:5 https://mirrors.aliyun.com/ubuntu jammy-security InRelease
Reading package lists... Done
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-sdk-6.0 : Depends: netstandard-targeting-pack-2.1 (>= 2.1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.


ubuntu@ubuntu2204:~$ uname -a
Linux ubuntu2204 5.15.0-23-generic dotnet/core#23-Ubuntu SMP Fri Mar 11 14:54:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux


ubuntu@ubuntu2204:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Jammy Jellyfish (development branch)
Release:        22.04
Codename:       jammy

goldenbull avatar Mar 29 '22 06:03 goldenbull

can not install from apt source yet.

@rbhanda, @NikolaMilosavljevic - Can you investigate this (from https://github.com/dotnet/core/issues/7038#issuecomment-1081457707)?

It doesn't look like netstandard-targeting-pack-2.1 is getting published. It doesn't exist at https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/n/netstandard-targeting-pack-2.1/.

mthalman avatar Mar 29 '22 12:03 mthalman

go on...

The following packages have unmet dependencies:
 dotnet-sdk-6.0 : Depends: netstandard-targeting-pack-2.1 (>= 2.1.0) but it is not installable
                  Depends: aspnetcore-runtime-6.0 (>= 6.0.3) but it is not going to be installed
                  Depends: dotnet-runtime-6.0 (>= 6.0.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

goldenbull avatar Apr 06 '22 08:04 goldenbull

can not install from apt source yet.

@rbhanda, @NikolaMilosavljevic - Can you investigate this (from #7038 (comment))?

It doesn't look like netstandard-targeting-pack-2.1 is getting published. It doesn't exist at https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/n/netstandard-targeting-pack-2.1/.

Yes, the package is missing - @rbhanda @leecow can this be added for 22.04?

NikolaMilosavljevic avatar Apr 06 '22 15:04 NikolaMilosavljevic

Installation on 22.04 will hit another issue, even after netstandard-targeting-pack-2.1 gets added to 22.04 feed.

dotnet-runtime-deps-6.0 package will fail to install due to missing libssl dependencies:

The following packages have unmet dependencies:
 dotnet-runtime-deps-6.0 : 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

NikolaMilosavljevic avatar Apr 06 '22 16:04 NikolaMilosavljevic

A 22.04 package should depend on libssl3: https://packages.ubuntu.com/jammy/libssl3

That's only true for .NET 6 and higher. .NET Core 3.1 doesn't try to load OpenSSL 3.

bartonjs avatar Apr 06 '22 16:04 bartonjs

netstandard-targeting-pack-2.1 is now available at https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/n/

leecow avatar Apr 08 '22 16:04 leecow

A 22.04 package should depend on libssl3: https://packages.ubuntu.com/jammy/libssl3

That's only true for .NET 6 and higher. .NET Core 3.1 doesn't try to load OpenSSL 3.

@bartonjs I'm not sure I follow, why should that not apply to .NET 5? I fail to install .NET 5 for the exact same error, would be great if this could be fixed soon (Ubuntu jammy is just around the corner).

emmenlau avatar Apr 13 '22 12:04 emmenlau

A 22.04 package should depend on libssl3: https://packages.ubuntu.com/jammy/libssl3 That's only true for .NET 6 and higher. .NET Core 3.1 doesn't try to load OpenSSL 3.

@bartonjs I'm not sure I follow, why should that not apply to .NET 5? I fail to install .NET 5 for the exact same error, would be great if this could be fixed soon (Ubuntu jammy is just around the corner).

Because support for .NET 5 ends on May 8, 2022.

mthalman avatar Apr 13 '22 13:04 mthalman

Because support for .NET 5 ends on May 8, 2022.

Ok I can see that.

emmenlau avatar Apr 13 '22 13:04 emmenlau

I feel like part of the checklist would have been to test/verify that all .NET versions work on Ubuntu 22.04. The fact that we had an emergency at https://github.com/dotnet/runtime/issues/67986 suggests something in the process went wrong?

omajid avatar Apr 14 '22 14:04 omajid

Ok, Ubuntu 22.04 is out, but there is no support for .NET yet. Are there estimates when this will come? I can try to install .NET from Ubuntu 20.04 as a workaround, but I don't want to waste time on workarounds when the solution is within reach.

emmenlau avatar Apr 22 '22 07:04 emmenlau

(Ignore, duplicate information)

Nican avatar Apr 22 '22 11:04 Nican

I've been reading up around this today as I've been trying to get dotnet-sdk (version 6) up and running on Ubuntu 22.04.

As far as I can understand there seems to be dependency related problems first and foremost - and while I do get that you want or need the deb/ppa method to work - it seems to me like dependency hell is specifically one of the things Snaps (and Flatpaks for that matter) are meant to mitigate. Maybe it would be quicker to fix this in the snap before fixing it more broadly?

I guess snaps are not available in WSL so it will need to be managed otherwise as well - but those of us trying to get it working on full fat Ubuntu desktop would at least be happy :smile:

hernil avatar Apr 25 '22 13:04 hernil

@hernil I think this issue does not track such a problem with snap's. Are you sure there is a problem with dotnet snap packages? Since they may not depend on the system ssl, they should install like before... Maybe you can document here the exact problem you are experiencing, that may help.

emmenlau avatar Apr 25 '22 14:04 emmenlau

@emmenlau Thanks for replying so quickly!

Trying a fresh install with snap gives me the following: sudo snap install dotnet-sdk dotnet new console -o MyApp -f net6.0

[1]    1490095 segmentation fault (core dumped)  dotnet new console -o MyApp -f net6.0

A tip from a comment here on github suggested to override the ssl-version by environment variable which gets me a step further. export CLR_OPENSSL_VERSION_OVERRIDE=1.0.0 dotnet new console -o MyApp -f net6.0

The template "Console App" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /home/hernil/Documents/MyApp/MyApp.csproj...
  Determining projects to restore...
  Restored /home/hernil/Documents/MyApp/MyApp.csproj (in 68 ms).
Restore succeeded.

This seems to suggest that there is indeed some sort of dependency related problem?

~~So I'm one step closer, but this seems like a very fragile solution. It doesn't really play seamlessly with Rider either which is unfortunate for my use case.~~

Trying to actually run the app gives me:

cd MyApp 
➜  MyApp dotnet run
/home/hernil/Documents/MyApp/bin/Debug/net6.0/MyApp: /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
/home/hernil/Documents/MyApp/bin/Debug/net6.0/MyApp: /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
/home/hernil/Documents/MyApp/bin/Debug/net6.0/MyApp: /snap/core18/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)

So yeah, as far as I can see the snap is not working out of the box on Ubuntu 22.04 :crying_cat_face:

hernil avatar Apr 25 '22 14:04 hernil

I second the problem of @hernil, just installed a fresh version of Ubuntu 22.04.

Installed the sdk via snap and added an alias

sudo snap install dotnet-sdk --classic --channel=6.0
sudo snap alias dotnet-sdk.dotnet dotnet

While creating my first project I had the same problem:

dotnet new
Segmentation fault (core dumped)
sudo dotnet new
Segmentation fault

Also, I am not able to installing it via apt because I have the following error:

The following packages have unmet dependencies:
 dotnet-runtime-deps-6.0 : 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
E: Unable to correct problems, you have held broken packages.

I hope this could be helpful. 💡

ilmalte avatar Apr 25 '22 20:04 ilmalte

As an update, it seems like that the apt package for dotnet has been fixed.

Expect, when I tried to load my workload, I got strange weird network behavior: https://github.com/dotnet/runtime/issues/68423

I tried to debug to the best of my abilities, but I ran out of time, and had to revert to 20.04.

Nican avatar Apr 25 '22 20:04 Nican

@Nican I still have the error message about the libssl issue. Seems like I am gonna revert to 20.04 as well.

tsyrya avatar Apr 26 '22 02:04 tsyrya

As an update, it seems like that the apt package for dotnet has been fixed.

I can confirm that dotnet 6 has been fixed and works for me. However dotnet 3.1 should still be in maintenance for the rest of the year, but it is currently (as of 2022.04.26) not possible to install with apt on Ubuntu 22.04:

The following packages have unmet dependencies:
 dotnet-runtime-deps-3.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
E: Unable to correct problems, you have held broken packages.

emmenlau avatar Apr 26 '22 08:04 emmenlau