GYP ERR! build error. stack Error: 'make' failed with exit code 2

后端 未结 11 1391
自闭症患者
自闭症患者 2021-01-07 16:30

I am currently working on a nodejs web application I am having trouble pushing the application online with cloud foundry. I did some research on the errors and it seems that

11条回答
  •  情话喂你
    2021-01-07 16:44

    I got the same problem when installed the gazebo gzweb. I found out that apt install nodejs install the "node" in the direction of "/usr/bin/". You can verify by which node. But node -v is still referring to "/usr/local/bin/node" which is a wrong version I failed to uninstall. Thus as my solution:

    rm -rf /usr/local/bin/node
    cp -i /usr/bin/node /usr/local/bin/
    cp -i /usr/bin/nodejs /usr/local/bin/
    

    Steps:

    sudo apt-get install npm npm install -g n n stable npm install npm@6.9.0 -g ln -s /usr/local/bin/npm /usr/bin/npm

提交回复
热议问题