'Struggling to install Azure DevOps deployment agent on Linux machine

So I'm trying to install an Azure DevOps deployment agent on Linux machines (Ubuntu 20.04 Focal Fossa). I tried to do so by executing the the code snippet, that the Azure DevOps site generates. However I keep getting this annoying error message pointing to a missing libssl library:

No usable version of the libssl was found

There is a YouTube video (How to solve the "No usable version f the libssl was found" in GitHub Actions and Azure Pipelines) explaining how to get around this issue. Basically the idea is to either upgrade to the latest .NET Core version (I assume the agent uses .NET Core) or to downgrade the incompatible libssl library.

However none of that worked for me. First of all, the .NET Core Framework doesn't seem to be installed after the installation of the agent has errored out, maybe there was just some checking beforehand, fine whatever. But after I installed the latest .NET Core runtime, the same error pops up.

Secondly, I'm unable to locate the suggested older version of the libssl-dev package (looking for version 1.0.x). On pkgs.org there are no entries for version 1.0.x for Ubuntu, same on packages.ubuntu.com. And when I type in apt list -a libssl-dev I also only get version 1.1.x.

Why is this so difficult? Has anyone tried using the 1.0.x version of libssl-dev and did it work? And how did you get a hold of it?

Any suggestion greatly appreciated!



Solution 1:[1]

We have 2 ways :

Upgrade .NET Core version

The simplest one would be to upgrade to a most recent version of .NET Core.

And I'm not talking about major upgrades, you don't need to go all the way to .NET 5.

Luckily for us, the .NET team has updated .NET Core 2.1 to support the version 1.1 of OpenSSL.

All you need to do is make sure that you are using the latest minor build of .NET Core 2.1, which at the time of writing is the 2.1.28 which has an SDK version of 2.1.816. And of course

And doing this in Actions or Pipelines is very simple. Just change the version of .NET Core in the Setup task and you are done.

Install the Older Version

If for any reason it is not possible for you to use the newer version of .NET Core, there is still one more thing you can do.

Even tho as I've said before Many Linux distributions are starting to make OpenSSL 1.1 the new default, most of them still have a package for 1.0.

So you just need to find and install that.

On CentOS and Fedora for example it's called compact-openssl10. For openSUSE, instead, it's libopenssl1_0_0. Finally, for Ubuntu and Debian we have the libssl-dev.

After installing the older version of the library, .NET Core will find it, pick it up and use it automatically.

And this of course can be done locally on your machine, but also on the CI agents in Azure Pipelines and GitHub Actions, simply using a script task or action.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jerry King