end0tknr's kipple - 新web写経開発

http://d.hatena.ne.jp/end0tknr/ から移転しました

install node.js ver.6.11.2 from src

$ wget https://nodejs.org/dist/v6.11.2/node-v6.11.2.tar.gz
$ tar -zxvf node-v6.11.2.tar.gz
$ ./configure --prefix=/usr/local/node_6
$ make
$ make check
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/endo/tmp/node-v6.11.2/out'
  touch 03a5027d2619b4eab2b3565f4103c11129ae205b.intermediate
  LD_LIBRARY_PATH=/home/endo/tmp/node-v6.11.2/out/Release/lib.host:/home/endo/tmp/node-v6.11.2/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8_inspector/third_party/v8_inspector/platform/v8_inspector; mkdir -p /home/endo/tmp/node-v6.11.2/out/Release/obj/gen/blink/platform/v8_inspector/public/protocol /home/endo/tmp/node-v6.11.2/out/Release/obj/gen/blink/platform/v8_inspector/protocol /home/endo/tmp/node-v6.11.2/out/Release/obj/gen/blink/platform/inspector_protocol; python ../inspector_protocol/CodeGenerator.py --output_base "/home/endo/tmp/node-v6.11.2/out/Release/obj/gen/blink/platform" --config inspector_protocol_config_stl.json
   :
[==========] Running 26 tests from 3 test cases.
[----------] Global test environment set-up.
[----------] 2 tests from Base64Test
[ RUN      ] Base64Test.Encode
[       OK ] Base64Test.Encode (0 ms)
  :
[ RUN      ] InspectorSocketTest.ErrorCleansUpTheSocket
[       OK ] InspectorSocketTest.ErrorCleansUpTheSocket (1 ms)
[----------] 18 tests from InspectorSocketTest (39 ms total)

[----------] Global test environment tear-down
[==========] 26 tests from 3 test cases ran. (39 ms total)
[  PASSED  ] 26 tests.
make[1]: Leaving directory `/home/endo/tmp/node-v6.11.2'
/usr/local/bin/python tools/test.py --mode=release -J \
    doctool inspector known_issues message pseudo-tty parallel sequential addons
[05:00|% 100|+ 1358|-   0]: Done                                               
make lint
make[1]: Entering directory `/home/endo/tmp/node-v6.11.2'
Linting is not available through the source tarball.
Use the git repo instead: git clone https://github.com/nodejs/node.git
exit 1
make[1]: *** [lint] Error 1
make[1]: Leaving directory `/home/endo/tmp/node-v6.11.2'
make: *** [test] Error 2
$ 

make checkの最後で errorと表示されましたが、 test自体は全てpassしているようでしたので、 そのまま make installしました。

$ su
# make install
$ ls -l /usr/local/node_6/bin
total 29060
-rwxrwxr-x 1 root root 29754894 Aug 15 04:47 node
lrwxrwxrwx 1 root root       38 Aug 15 06:48 npm -> ../lib/node_modules/npm/bin/npm-cli.js

npmのpath編集

PATHへの追加が面倒でしたので

# vi /usr/local/node_6/bin/npm
old) #!/usr/bin/env node
new) #!/usr/local/node_6/bin/node