No usable version of the libssl was found

Hi,

since the January 2021 we are getting the below mention error on our AzureDevOps while Build process, not sure why this sonar config error is popping up,
can your help or provide direction for fixing this issue.

Error :

Starting: Prep - Configure SonarCloud

Task : Prepare Analysis Configuration
Description : Prepare SonarCloud analysis configuration
Version : 1.17.0
Author : sonarsource
Help : Version: 1.17.0. More Information

SYSTEMVSSCONNECTION exists true
/opt/hostedtoolcache/dotnet/dotnet /home/vsts/work/_tasks/SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255/1.17.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll begin /k:mi-buyerportal-api /o:mihomes
SonarScanner for MSBuild 5.1
Using the .NET Core version of the Scanner for MSBuild
##[error]No usable version of the libssl was found
No usable version of the libssl was found
##[error]The process ‘/opt/hostedtoolcache/dotnet/dotnet’ failed with exit code null
Finishing: Prep - Configure SonarCloud

Hi @khwaja625 and welcome to the community.

Seems that this is related to missing libs in your linux OS, not the scanner.

You can check this kind of GH issue which may help : No usable version of libssl was found · Issue #4749 · dotnet/core · GitHub

Mickaël

Thanks Mickael, after following the answers to the links your provided m getting the same error.

Using the .NET Core version of the Scanner for MSBuild
##[error]No usable version of the libssl was found

you mention about the missing libs, what are those libraries are those can please let me know and point me to the right direction or provide the link.

this is the openssl version is installed on the project image
image

Can you try installing this one ?

https://zoomadmin.com/HowToInstall/UbuntuPackage/libssl-dev

(it’s for Ubuntu, check for other source if this is not your distribution)

Mickaël

I’m having the same issue. Azure Pipeline using ubuntu-latest; however, the SonarCloud components require an old version of .NET Core (2.2.103) as per guidance here: SonarCloud Support for .NET Core 3.0.100-preview5 - #8 by Jared_Stroebele. I’m building a Linux Docker Container so cannot use windows-latest. I’ve tried installing prerequisites and the latest libssl-dev but nothing works. This is holding up a production pipeline.

Seb

Thanks for your replies,
It resolved my issue after installing .Net 2.0, earlier it was 2.2, below is my changes.

#REGION Prep
- task: UseDotNet@2
displayName: Prep - Install dotnet for SonarCloud support
condition: |
eq(variables.SkipSonar, false)
inputs:
version: ‘2.0.0’