簡體   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