nodejs 原码安装安装时提示:IOError: [Errno 13] Permission denied: '/usr/local/bin/node' 求解!

环境: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

第1个回答  2013-04-24
要用root权限,可以用sudo表示用root权限执行,就是sudo make之类的本回答被提问者和网友采纳
第2个回答  2013-05-03
使用sudo执行此代码
第3个回答  2018-03-30

要用root权限,可以用sudo表示用root权限执行,就是sudo make之类的。使用sudo执行此代码。

本回答被网友采纳
相似回答