简体   繁体   中英

Error installing node.js on bluehost

My attempt to install node.js on bluehost is failing. The last error I get is about having a read only file system. I set the directory I'm installing from/to 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

Here is what worked for me. After downloading, I ran configure with the --prefix option. With your homedir as the example:

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

then built and installed it (make && make install). That installs everything locally under your 'node' folder.

After that, set your path to include the node binary:

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

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM