2

I want to install node.js on QNAP NAS, it's a linux OS I can use ipkg install package. but ipkg not have node.js...

I reference web forum as http://forum.qnap.com/viewtopic.php?p=248556, installed V8 JavaScript Engine.

Then install node.js

When I'm typing make on /opt/node, that shows an error message as follows:

make -C out BUILDTYPE=Release V=1 make[1]: Entering directory /share/HDA_DATA/.qpkg/Optware/node/out' flock /share/HDA_DATA/.qpkg/Optware/node/out/Release/linker.lock g++ -pthread -rdynamic -o /share/HDA_DATA/.qpkg/Optware/node/out/Release/mksnapshot -Wl,--start-group /share/HDA_DATA/.qpkg/Optware/node/out/Release/obj.target/mksnapshot/deps/v8/src/mksnapshot.o /share/HDA_DATA/.qpkg/Optware/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /share/HDA_DATA/.qpkg/Optware/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a -Wl,--end-group make[1]: flock: Command not found make[1]: *** [/share/HDA_DATA/.qpkg/Optware/node/out/Release/mksnapshot] Error 127 make[1]: Leaving directory/share/HDA_DATA/.qpkg/Optware/node/out' make: * [node] Error 2

The QNAP NAS(TS-119P2) does not have flock command line, What can I do? Could somebody help me?

Dillon Benson
  • 4,280
  • 4
  • 23
  • 25
YuTin
  • 31
  • 1
  • 5

2 Answers2

4
ipkg install util-linux

It contains flock command.

Goto node source dir.

./configure --prefix=/opt
...

LINK=g++ make
...

LINK=g++ make install

Worked for me.

babalooi
  • 159
  • 1
  • 13
2

I had to export CC as my compiler, and then run the commands babalooi suggested:

export CC=/opt/bin/gcc
./configure --prefix=/opt

...

LINK=g++ make

...

LINK=g++ make install
cookandy
  • 905
  • 1
  • 8
  • 16