在bluehost上安装node.js时出错

时间:2015-03-13 07:23:02

标签: python node.js bluehost

我在bluehost上安装node.js的尝试失败了。我得到的最后一个错误是有一个只读文件系统。我将目录I' m from / to设置为755。

make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home7/arielbal/node-v0.12.0/out'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home7/arielbal/node-v0.12.0/out'
ln -fs out/Release/node node
/ramdisk/bin/python tools/install.py install '' '/usr/local'
installing /usr/local/bin/node
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home7/arielbal/node-v0.12.0/out'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home7/arielbal/node-v0.12.0/out'
ln -fs out/Release/node node
/ramdisk/bin/python tools/install.py install '' '/usr/local'
installing /usr/local/bin/node
Traceback (most recent call last):
  File "tools/install.py", line 202, in <module>
    run(sys.argv[:])
  File "tools/install.py", line 197, in run
    if cmd == 'install': return files(install)
  File "tools/install.py", line 130, 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 70, in try_copy
    try_unlink(target_path) # prevent ETXTBSY errors
  File "tools/install.py", line 33, in try_unlink
    os.unlink(path)
OSError: [Errno 30] Read-only file system: '/usr/local/bin/node'
make: *** [install] Error 1

1 个答案:

答案 0 :(得分:0)

这对我有用。下载后,我使用--prefix选项运行configure。以homedir为例:

./configure --prefix="/home7/arielbal/node"

然后构建并安装它(make&amp;&amp; make install)。这会在“node”文件夹下本地安装所有内容。

之后,设置路径以包含节点二进制文件:

export PATH="${PATH}:/home7/arielbal/node/bin"

希望有所帮助!