Sonar analysis fail for c++

Sonar analysis failing for C++ app.
groovy snap as below

stage('Sonar Analysis') {
			    script{
                //def scannerHome = tool 'SonarScanner 4.0';
                withSonarQubeEnv('BMS SonarQube') {
				 sh script:
		          """
				  source ~/.nvm/nvm.sh && source ~/.profile && source ~/.bashrc
                  /repos/sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner -D sonar.projectKey=webexdvp-${App} -D sonar.projectName=webexdvp-${App} -Dsonar.branch.name=${BRANCH} -D sonar.projectVersion=1.0.0 -Dsonar.language=java  -Dsonar.exclusions=**/*.java,**/*.html,**/*.xml,**/professional-services/**,**/sentinel/**,**/automation/**,**/database-scripts/**,**/build/**,**/common/aws-manager/**,**/devicedetectorweb/**,**/configuration/**,**/dcmgui/**,**/sdhgui/**,**/querybuilerui/**,**/datasummaryweb/**,**/cmdashboard/**,**/filepulse/** -Dsonar.projectBaseDir=. -Dsonar.sourceEncoding=UTF-8 -Dsonar.scm.disabled=true -Dsonar.skipDesign=true -Dsonar.skipPackageDesign=true -Dsonar.dynamicAnalysis=reuseReports
				  """
                     }
			}
		}
**
Jenkins console
+ /repos/sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner -D sonar.projectKey=webexdvp-davincisip -D sonar.projectName=webexdvp-davincisip -Dsonar.branch.name=davinciSIP_jenkins -D sonar.projectVersion=1.0.0 -Dsonar.language=c++ '-Dsonar.exclusions=**/*.java,**/*.html,**/*.xml,**/professional-services/**,**/sentinel/**,**/automation/**,**/database-scripts/**,**/build/**,**/common/aws-manager/**,**/devicedetectorweb/**,**/configuration/**,**/dcmgui/**,**/sdhgui/**,**/querybuilerui/**,**/datasummaryweb/**,**/cmdashboard/**,**/filepulse/**' -Dsonar.projectBaseDir=. -Dsonar.sourceEncoding=UTF-8 -Dsonar.scm.disabled=true -Dsonar.skipDesign=true -Dsonar.skipPackageDesign=true -Dsonar.dynamicAnalysis=reuseReports /repos/jenkins-home/workspace/team_webexdvp/webexdvp/voicegw-cf@tmp/durable-7e5bdd57/script.sh: line 2: /repos/sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner: No such file or directory [Pipeline] } WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed? [Pipeline] // withSonarQubeEnv

[Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE

It looks like sonar-scanner can’t be found

line 2: /repos/sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner: No such file or director

Why did you comment this out – it should define where to run the SonarScanner from. No need to check it into your repo.