无法安装NodeJs:/ usr / bin / env:node:没有这样的文件或目录 [英] Cannot install NodeJs: /usr/bin/env: node: No such file or directory

查看:840
本文介绍了无法安装NodeJs:/ usr / bin / env:node:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我读过关于做到这一点( https://github.com/atom/atom/issues/2241\">issues?),所以这是我为安装它所做的:

  sudo apt-get install npm 
$ b sudo npm install -g grunt-cli

之后输入咕噜声我得到了错误:

  / usr / bin / env:node:没有这样的文件或目录

所以,我试过了:

  curl -sL https://deb.nodesource.com/setup | sudo bash  -  

sudo apt-get install -y nodejs
$ b sudo apt-get update

再试一次,仍然出现错误,我试过了:

  sudo add-apt-repository https://launchpad.net/~chris-lea/+archive/node.js/ 

sudo apt-get install -y nodejs

我收到了以下消息:

  nodejs已经是最新版本了。 
0升级,0新安装,0删除和3不升级。

我曾尝试清理以防万一:

  sudo apt-get autoremove 

但是,错误仍然存​​在:当我输入grunt时,我仍然得到 / usr / bin / env:node:没有这样的文件或目录



我该怎么办? 解决方案

找到答案。以防万一它可以帮助别人,我会在这里发布它:

做一个符号链接解决了这个问题: ln -s / usr / bin / nodejs / usr / bin / node
(我的感谢信和+1票投给 bodokaiser )。



注意:我认为这篇文章并非完全重复,因为该帖子有点儿是一个浏览问题。


I'm trying to install nodeJs into my Ubuntu 14.04 in order to use GruntJs.

I've read about Ubuntu different way of doing it (issues?), so this is what I've done in order to install it:

sudo apt-get install npm

sudo npm install -g grunt-cli

Typing grunt after that I've got the error:

/usr/bin/env: node: No such file or directory

So, I've tried:

curl -sL https://deb.nodesource.com/setup | sudo bash -

sudo apt-get install -y nodejs

sudo apt-get update

And trying again, and still getting the error, I've tried:

sudo add-apt-repository https://launchpad.net/~chris-lea/+archive/node.js/

sudo apt-get install -y nodejs

I've got this message:

nodejs is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.

I did try a cleanup just in case:

sudo apt-get autoremove

But nope, the error is still there: when I type grunt I still get /usr/bin/env: node: No such file or directory

What should I do?

解决方案

Found the answer. Just in case it helps someone, I do post it here:

Doing a symlink solves the issue: ln -s /usr/bin/nodejs /usr/bin/node (My thanks and +1 vote to bodokaiser).

NOTE: I think this post is not an exact duplicate, because that post was somewhat a browserify question.

这篇关于无法安装NodeJs:/ usr / bin / env:node:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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