Ubuntu下Node安装时遇到的问题

系统环境: ubutnu 14.04

主要变化有:

命令提示符由 node 改为 nodejs

$ node --version
$ nodejs --version
v0.10.25

这样导致 npm(通过$ curl -L http://npmjs.org/install.sh |sudo sh来安装)安装出现如下问题:

$ sudo /bin/bash install.sh
[sudo] password for pabb:
tar=/bin/tar
version:
tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You need Node.js to run this program.
node --version reports:
with exit code = 1
Please install Node.js before continuing.

一个修改方法为:
修改install.sh 文件,

 53 # make sure that Node.js exists
 54 node=`which nodejs 2>&1`
 55 #node=`which node 2>&1`
 56 ret=$?
$ sudo /bin/bash install.sh
tar=/bin/tar
version:
tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
install npm@latest
fetching: http://registry.npmjs.org/npm/-/npm-3.8.8.tgz
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/lib
└─┬ npm@3.8.8
  ├── abbrev@1.0.7
  ├── ansi-regex@2.0.0

安装npm 之后,npm 还是无法使用

编译安装需要使用2.7, 使用高版本的py3, .config 不通过

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容