In Networking Last updated:
Share on:
Cloudways offers managed cloud hosting for any size business to host a website or complex web applications.

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.

Share on:
  • Chandan Kumar
    Chandan Kumar is a seasoned technology enthusiast and entrepreneur passionate about empowering businesses and individuals globally. As the founder of Geekflare, a leading technology publication, Chandan has spearheaded the development…

Thanks to our Sponsors

More great readings on Networking

Power Your Business

Some of the tools and services to help your business grow.
  • The text-to-speech tool that uses AI to generate realistic human-like voices.

    Try Murf AI
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.

    Try Brightdata
  • is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.

    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.

    Try Intruder