没有sudo的NPM模块将无法全局安装

编程入门 行业动态 更新时间:2024-10-09 14:21:34

没有sudo的NPM模块将无法<a href=https://www.elefans.com/category/jswz/34/1765343.html style=全局安装"/>

没有sudo的NPM模块将无法全局安装

我刚刚重新安装了Ubuntu 12.04 LTS,在执行这些步骤之前,我没有做任何其他事情

  1. [使用以下脚本通过程序包管理器安装的节点

    sudo apt-get update
    
    sudo apt-get install python-software-properties python g++ make
    
    sudo add-apt-repository ppa:chris-lea/node.js
    
    sudo apt-get update
    
    sudo apt-get install nodejs
    
  2. 试图在全球安装yeoman,express,n,yeoman的生成器,并且它们都返回了相同的错误

    npm ERR!错误:EACCES,符号链接'../ lib / node_modules / n / bin / n'

    npm ERR! {[错误:EACCES,符号链接'../lib/node_modules/n/bin/n']错误号:3,代码:'EACCES',路径:'../ lib / node_modules / n / bin / n'}] >

    npm ERR!

    npm ERR!请尝试以root /管理员身份再次运行此命令。

    npm ERR!系统Linux 3.8.0-29-通用

    npm ERR!命令“ / usr / bin / node”“ / usr / bin / npm”“安装”“ -g”“ -d”“ n”

    npm ERR! cwd / home / heberlz

    npm ERR!节点-v v0.10.20

    npm ERR! npm -v 1.3.11

    npm ERR!路径../ lib / node_modules / n / bin / n

    npm ERR!代码EACCES

    npm ERR! errno 3

    npm ERR!堆栈错误:EACCES,符号链接'../ lib / node_modules / n / bin / n'

    npm ERR!

    npm ERR!其他日志记录详细信息可以在以下位置找到:

    npm ERR! /home/heberlz/npm-debug.log

    npm ERR!错误代码0

  3. 递归回收以下文件夹的所有权

  4. 〜/ .npm,/ usr / lib / node,/ usr / lib / node_modules,以及以下符号链接的/ usr / bin / node,/ usr / bin / nodejs 绝对没有成功

    我需要在没有sudo的情况下安装yeoman及其生成器,以免稍后出现麻烦:(

我刚刚重新安装了Ubuntu 12.04 LTS,在执行其他步骤之前,我先执行了以下步骤:使用以下脚本通过软件包管理器安装Node sudo apt-get update sudo apt-get install python -...

回答如下:

更多推荐

没有sudo的NPM模块将无法全局安装

本文发布于:2024-05-07 04:24:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1754289.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:全局   模块   sudo   NPM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!