【问题标题】:Error installing node.js on bluehost在 bluehost 上安装 node.js 时出错
【发布时间】:2015-03-13 07:23:01
【问题描述】:

我在 bluehost 上安装 node.js 的尝试失败了。我得到的最后一个错误是关于只读文件系统。我将要安装的目录从/到设置为 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

【问题讨论】:

  • 是共享主机吗?另外,您是否检查了目录上的权限以确保在您更改它们后它们通过了?
  • 它是共享主机。我应该检查权限。
  • 我刚刚意识到它正在尝试安装到 /usr/locl/bin 中,而我绝对没有写入权限。我想我需要想办法将它安装为某种本地安装。

标签: python node.js bluehost


【解决方案1】:

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

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

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

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

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

希望有帮助!

【讨论】:

    猜你喜欢
    • 2016-11-04
    • 2017-12-21
    • 1970-01-01
    • 2016-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-20
    相关资源
    最近更新 更多