Package install not working for Shazam after outputting a bunch of GCC and G++ compiler commands (non-zero exit status)

You seem to be missing some crucial development packages. I assume you are using R either from the Ubuntu repositories or from the CRAN repository. In that case

sudo apt install r-base-dev

should fix the issue at hand. Possible sources of binary packages: