键入“sudo npm install -g 陨石"时出错 [英] error when type 'sudo npm install -g meteorite'

查看:74
本文介绍了键入“sudo npm install -g 陨石"时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装陨石.我已成功安装 nodejs(v0.10.7).当我输入sudo npm install -g 陨石"时.下面是错误.我认为 npm(1.2.21) 可能存在一些问题.但我不知道如何解决它.我使用 ubuntu12.10 64 位.有什么想法吗?

<块引用>

npm http GET https://registry.npmjs.org/meteorite

<块引用>

npm http 304 https://registry.npmjs.org/meteorite

<块引用>

npm 错误!错误:ENOTDIR,mkdir '/home/icarus/tmp/npm-5885/1369411459617-0.27502001402899623'

<块引用>

npm 错误!如果您需要帮助,可以在以下位置报告此日志:

<块引用>

npm 错误!或通过电子邮件发送至:

<块引用>

npm 错误!npm-@googlegroups.com

<块引用>

npm 错误!系统 Linux 3.5.0-17-generic

<块引用>

npm 错误!命令/usr/bin/node"/usr/bin/npm"安装"-g"陨石"

<块引用>

npm 错误!cwd/home/icarus

<块引用>

npm 错误!node -v v0.10.7

<块引用>

npm 错误!npm -v 1.2.21

<块引用>

npm 错误!不行代码 0

解决方案

对于像我一样首先来到这里的人来说,这通常是根目录中有一个 tmp 文件夹的问题,然后 npm 尝试从缓存中安装.这应该可以解决它:

rm -rf ~/tmp须藤 npm 缓存清除须藤 npm install -g 陨石

如果您仍然遇到 ENOTDIR 错误,您可以尝试自己创建目录、清除缓存并重新安装,但看起来删除 tmp 文件夹通常可以解决问题.

支持 Coombesy 发布此解决方案 此处.

I'm trying to install the meteorite. I've success to install nodejs(v0.10.7).and when I type 'sudo npm install -g meteorite'. It comes the error below. I think it may exist some problem with npm(1.2.21). But I do not how to solve it. And I use ubuntu12.10 64bit. Any ideas?

npm http GET https://registry.npmjs.org/meteorite

npm http 304 https://registry.npmjs.org/meteorite

npm ERR! Error: ENOTDIR, mkdir '/home/icarus/tmp/npm-5885/1369411459617-0.27502001402899623'

npm ERR! If you need help, you may report this log at:

npm ERR! or email it to:

npm ERR! npm-@googlegroups.com

npm ERR! System Linux 3.5.0-17-generic

npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "meteorite"

npm ERR! cwd /home/icarus

npm ERR! node -v v0.10.7

npm ERR! npm -v 1.2.21

npm ERR! not ok code 0

解决方案

For those who landed here first like me, this is usually an issue with a tmp folder in your root directory followed by npm trying to install from the cache. This should fix it:

rm -rf ~/tmp
sudo npm cache clear
sudo npm install -g meteorite

If you still get the ENOTDIR error you can try making the directory yourself, clearing the cache, and reinstalling, but it looks like removing the tmp folder usually does the trick.

Props to Coombesy for posting this solution here.

这篇关于键入“sudo npm install -g 陨石"时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆