求助:烦请各位指点一下,nodejs 原码安装安装时提示:IOError: [Errno 13] Permission denied: '/usr/local/bin/node' ,先谢过!
发布于 12 年前 作者 cnwang 36090 次浏览 最后一次编辑是 8 年前

环境:ubuntu 12.10 node版本:v0.10.5 错误详情:
make[1]: Leaving directory `/home/sammo/soft/node-v0.10.5/out’ ln -fs out/Release/node node /usr/bin/python tools/install.py install installing /usr/local/bin/node Traceback (most recent call last): File “tools/install.py”, line 156, in <module> run(sys.argv[:]) File “tools/install.py”, line 151, in run if cmd == ‘install’: return files(install) File “tools/install.py”, line 122, in files action([‘out/Release/node’], ‘bin/node’) File “tools/install.py”, line 79, in install def install(paths, dst): map(lambda path: try_copy(path, dst), paths) File “tools/install.py”, line 79, in <lambda> def install(paths, dst): map(lambda path: try_copy(path, dst), paths) File “tools/install.py”, line 71, in try_copy return shutil.copy2(source_path, target_path) File “/usr/lib/python2.7/shutil.py”, line 130, in copy2 copyfile(src, dst) File “/usr/lib/python2.7/shutil.py”, line 83, in copyfile with open(dst, ‘wb’) as fdst: IOError: [Errno 13] Permission denied: '/usr/local/bin/node’ make: *** [install] Error 1

6 回复

Permission denied: ‘/usr/local/bin/node’ 要 sudo 一下。

如何sudo 一下??

已是: sudo make && make install

@cnwang

试试这样:

sudo su
make && make install

分开来吧… sudo make sudo make insatll …

补充一下 sudo make && make install 这样写, sudo 是不会传递到make install 这里来的…

已解决,是权限问题!谢谢各位。

回到顶部