Error: unzip -o $HOME/.sonar/sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ - cannot find or open /root/.sonar/sonar/build-wrapper-linux-x86.zip, /root/.sonar/sonar/build-wrapper-linux-x86.zip.zip or /root/.sonar/sonar/build-wrapper-linux-x86.zip.ZIP

when running bitbucket Pipelines getting an error cannot find or open /root/.sonar/sonar/build-wrapper-linux-x86.zip, /root/.sonar/sonar/build-wrapper-linux-x86.zip.zip or /root/.sonar/sonar/build-wrapper-linux-x86.zip.ZIP.

``

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

Hello @Ilya_Divinsky,

Welcome to the community!

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

curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip

Thanks,

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

@Ilya_Divinsky,

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/build-wrapper-linux-x86.zip -d $HOME/.sonar/
with
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/