Thank you for reaching out to us.
We think that you don't have a compiler on your side so we suggest using the commands below and then try installing the CLI again:
sudo apt-get install g++
npm install -g node-gyp
npm install appbuilder -g
Please get back to us if the issue remains and let us know the output.