Sonar-scanner command not found jenkins

Hello everyone!!

Jenkins 2.263.1
SonarQube: 7.9.4
SonarQube Scanner for Jenkins: 2.13
SonarScanner :

Jenkins was installed via the apt package on Ubuntu 18.04.5 LTS.
SonarQube Server was installed on another Ubuntu 20.04.1 LTS VM, with Nginx reverse proxy.

I configured the SonarScanner plugin in Jenkins, but when the pipeline is going to run it says that the sonar-scanner command is not found.

+ /opt/sonar-scanner- --version

/var/lib/jenkins/workspace/Gitea_IFAC_manhanah_master@tmp/durable-f80ff57d/ 1: /var/lib/jenkins/workspace/Gitea_IFAC_manhanah_master@tmp/durable-f80ff57d/ /opt/sonar-scanner- not found

script returned exit code 127

I already tried in Gobal Tools Configuration in SonarQube Scanner to mark to install automatically by Maven, as I provide the path for manual installation, however, the error still persists.

pipeline {
      agent { dockerfile true }
      stage('SonarQube analysis') {

            environment {

                scannerHome = tool 'sonar_scanner'


            steps {


                    echo '=========== SonarQube analysis ============'

                    withSonarQubeEnv('SonarQube') {

                        sh '${scannerHome}/bin/sonar-scanner --version'




Hi @rennanflima,


I can run the latest scanner on Jenkins, without any issues:

Can you double check the path? Or try again using the automatic installer?