首页 > 技术文章 > npm : Depends: node-gyp (>= 0.10.9) but it is not going to be installed

hencins 2020-03-20 11:19 原文

sudo apt install npm报错:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 npm : Depends: node-gyp (>= 0.10.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决:补全环境,如下:
sudo apt-get install nodejs-dev node-gyp libssl1.0-dev

再进行npm安装

推荐阅读