Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm failed to install time with make not found error

Tags:

node.js

Which OS are you using?

If it's Ubuntu you'll need to install the build-essential package:

$ sudo apt-get install build-essential

Then try to install the package again.


Simple Solution:

sudo apt-get install build-essential

and try again


I had the same problem using Docker, both on CENTOS 7 and RHEL 7 base images... do the following:

RUN yum install -y make gcc*

Worked perfectly for me!

Note: Instead of installing all 69 packages listed in gcc* you can install only what you need for the install nodejs like below

dnf install -y gcc-c++ make 

If you are using Windows and npm, install it through cmd (Administrator):

npm install --global --production windows-build-tools


For Manjaro/Arch Linux you need to install make and gcc

sudo pacman -S make gcc