パーフェクトJavascriptでJavascriptを学んでおり、
現在、Websocketの実践ということで、
本の手順に従ってNode.jsのインストールを行いました。
手順はこうです。
% git clone git:github.com/isaacs/nave.git ~/.nave % ~/.nave/nave.sh ls-remote % ~/.nave/nave.sh install 0.4.8 % ~/.nave/nave.sh use 0.4.8 % echo " ~/.nave/nave.sh use 0.4.8" >> ~/.bashrc % curl http://npm.js.org/install.sh | sh % npm install websocket-server websocket-server@1.4.04 ./node_modules/websocket-server
しかし、
naojiro@programming:~/workspace $ ~/.nave/nave.sh use 0.4.8 already fetched 0.4.8 sysctl: cannot stat /proc/sys/hw/ncpu: No such file or directory Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for program gcc or cc : /usr/bin/gcc Checking for gcc : ok Checking for library dl : yes Checking for openssl : yes Checking for library util : yes Checking for library rt : yes --- libeio --- Checking for library pthread : yes Checking for function pthread_create : yes Checking for function pthread_atfork : yes Checking for futimes(2) : yes Checking for readahead(2) : no Checking for fdatasync(2) : yes Checking for pread(2) and pwrite(2) : yes Checking for sendfile(2) : yes Checking for sync_file_range(2) : yes --- libev --- Checking for header sys/inotify.h : yes Checking for function inotify_init : yes Checking for header sys/epoll.h : yes Checking for function epoll_ctl : yes Checking for header port.h : not found Checking for header poll.h : yes Checking for function poll : yes Checking for header sys/event.h : not found Checking for header sys/queue.h : yes Checking for function kqueue : not found Checking for header sys/select.h : yes Checking for function select : yes Checking for header sys/eventfd.h : yes Checking for function eventfd : yes Checking for SYS_clock_gettime : yes Checking for library rt : yes Checking for function clock_gettime : yes Checking for function nanosleep : yes Checking for function ceil : yes Checking for fdatasync(2) with c++ : yes 'configure' finished successfully (3.512s) Waf: Entering directory `/home/ubuntu/.nave/src/0.4.8/build' DEST_OS: linux DEST_CPU: x64 Parallel Jobs: 2 Product type: program [74/75] cxx: src/node_crypto.cc -> build/default/src/node_crypto_4.o /usr/bin/g++ -pthread -g -O3 -DHAVE_OPENSSL=1 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=1 -DPLATFORM="linux" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/v8/include -I../deps/v8/include -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/linux-x64 -I../deps/c-ares/linux-x64 -Ideps/v8/include ../src/node_crypto.cc -c -o default/src/node_crypto_4.o ../src/node_crypto.cc: In static member function ‘static v8::Handle<v8::Value> node::crypto::SecureContext::Init(const v8::Arguments&)’: ../src/node_crypto.cc:101:29: error: ‘SSLv2_method’ was not declared in this scope method = SSLv2_method(); ^ ../src/node_crypto.cc:103:36: error: ‘SSLv2_server_method’ was not declared in this scope method = SSLv2_server_method(); ^ ../src/node_crypto.cc:105:36: error: ‘SSLv2_client_method’ was not declared in this scope method = SSLv2_client_method(); ^ Waf: Leaving directory `/home/ubuntu/.nave/src/0.4.8/build' Build failed: -> task failed (err #1): {task: cxx node_crypto.cc -> node_crypto_4.o} make: *** [program] Error 1 Failed to make 0.4.8 fail
このようなエラーが発生し、
% npm install websocket-server websocket-server@1.4.04 ./node_modules/websocket-server npm install websocket-server npm ERR! Linux 4.2.0-c9 npm ERR! argv "/home/ubuntu/.nave/installed/5.3.0/bin/node" "/home/ubuntu/.nave/installed/5.3.0/bin/npm" "install" "websocket-server" npm ERR! node v5.3.0 npm ERR! npm v3.3.12 npm ERR! Cannot convert undefined or null to object npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/workspace/npm-debug.log
NodeもWebsocketもインストールできませんでした。
どのようにすれば、
正常にインストールされるのでしょうか??
お手数おかけしますが、
アドバイス宜しくお願いします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/01/23 09:22