Error: unzip -o $HOME/.sonar/sonar/ -d $HOME/.sonar/ - cannot find or open /root/.sonar/sonar/, /root/.sonar/sonar/ or /root/.sonar/sonar/

when running bitbucket Pipelines getting an error cannot find or open /root/.sonar/sonar/, /root/.sonar/sonar/ or /root/.sonar/sonar/


can the build and the wrapper run on SonarCloud or only localhost ?

Hello @Ilya_Divinsky,

Welcome to the community!

it seems that is not found. Are you downloading build-wrapper before trying to unzip it? is the download successful?
You should be able to download the using something like this in your CI script:

curl --create-dirs -sSLo $HOME/.sonar/


Thanks for your prompt reply Abbas.
Sure, the wrapper can run on other instance.
Can it be executed on SonarCloud ?


I’m not sure I understand what you mean by this. You should run build-wrapper on the same instance where you run the scanner. You can do it locally or from any CI tool.

Try to look at some simple examples, they might help.

Hi @Ilya_Divinsky

You should change the command
unzip -o $HOME/.sonar/sonar/ -d $HOME/.sonar/
unzip -o $HOME/.sonar/ -d $HOME/.sonar/