繁体   English   中英

在 ubuntu 18.04 中安装 npm 时出错

[英]Error when installing npm in ubuntu 18.04

我已经安装了 node.js 并且在尝试安装 npm 时出现此错误。

 (base) yovel@the-beastpad:~$ 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. (base) yovel@the-beastpad:~$

尝试

sudo apt-get install nodejs-dev node-gyp libssl1.0-dev
sudo apt-get install npm

你必须试试这个

第一次更新 apt with

sudo apt update

然后

sudo apt install npm 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM