| FreeBSD에서 node.js용 zmq 설치 | 작성일 : 2014/12/23 18:28 |
| 조회수 : 9439 |
|
제 목 : FreeBSD에서 node.js용 zmq 설치 작성일 : 2014.11.18(화) 작성자 : 좋은진호(truefeel, http://coffeenix.net/ ) 1. ZeroMQ 라이브러리 설치
2. node.js zmq 설치 1) local 디렉토리에 install (현재디렉토리/node_modules/zmq/)
2) global 디렉토리에 install하려면 (/usr/local/lib/node_modules/zmq/)
3) 다음과 같은 에러가 나온다면
python을 찾지 못해서 발생한 문제이다. python이 python2 이름으로 설치되는 경우가 있는데, 심볼릭 링크를 걸어준다.
3. require()에서 모듈 경로 지정
require() 로 모듈지정할 때, 기본적으로 다음 같은 경로에서 찾는다.
이외 디렉토리에 모듈이 존재하면 3가지 방법 중에 선택한다. 1) require() 에 경로를 지정하거나 2) export NODE_PATH=/usr/local/lib/node_modules (csh은 setenv NODE_PATH /usr/local/lib/node_modules) 환경 변수를 지정하거나 3) npm install -g 로 글로벌하게 설치했다면, /usr/local/lib/node_modules를 심볼릭 링크를 건다.
개인적으로는 글로벌하게 설치해서, 3번 방법으로 사용중. 4. 참고 자료 * ZeroMQ http://kr.zeromq.org/ http://zeromq.org/ * JustinTulloss/zeromq.node (테스트용 소스 있음) https://github.com/JustinTulloss/zeromq.node |
|||||||||||||||||||||||||
|
|