Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

make: g++: Command not found on CentOS/RHEL 7- FIXED

Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

A solution to g++ command not found an error while installing nodejs packages.

I was installing Browsertime on CentOS 7 and encountered this error.

info sharp Downloading
prebuild-install WARN install No prebuilt binaries found (target=11.15.0 runtime=node arch=x64 libc= platform=linux)
make: Entering directory `/usr/lib/node_modules/browsertime/node_modules/sharp/build'
  TOUCH Release/
  CXX(target) Release/
make: g++: Command not found
make: *** [Release/] Error 127
make: Leaving directory `/usr/lib/node_modules/browsertime/node_modules/sharp/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2

Well, this could happen with any package which uses g++ library. To fix this error, all you got to do is install development tools with yum as below command.

yum groupinstall 'Development Tools'

Try to install what you were installing. It worked for me, and I hope for you too.

Thanks to our Sponsors
More great readings on Networking
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder