nodejs, npm 설치시 오류 해결 > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

nodejs, npm 설치시 오류 해결 정보

node.js nodejs, npm 설치시 오류 해결

본문

centos 에 nodejs, npm 설치하느라고 30분간 삽질한 후기.
 
1. 일단 tar 버전을 최신버전으로 컴파일한다. (http://firejune.com/1687?stag=tar 참고)
tar 버전을 1.26 으로 설치한다. 기존 설치된건 1.15 였다.

2. npm 을 설치한다.
% curl http://npmjs.org/install.sh | sh
에러발생 

gzip: stdin: unexpected end of file
/usr/local/bin/tar: Child returned status 1
/usr/local/bin/tar: Error is not recoverable: exiting now
It failed

해결방법 : locale을 변경한다. (euckr 인 경우에 오류가 발생)
[root@localhost ~]# locale
LANG=ko_KR.eucKR
LC_CTYPE="ko_KR.eucKR"
LC_NUMERIC="ko_KR.eucKR"
LC_TIME="ko_KR.eucKR"
LC_COLLATE="ko_KR.eucKR"
LC_MONETARY="ko_KR.eucKR"
LC_MESSAGES="ko_KR.eucKR"
LC_PAPER="ko_KR.eucKR"
LC_NAME="ko_KR.eucKR"
LC_ADDRESS="ko_KR.eucKR"
LC_TELEPHONE="ko_KR.eucKR"
LC_MEASUREMENT="ko_KR.eucKR"
LC_IDENTIFICATION="ko_KR.eucKR"
LC_ALL=

%export LANG=en_US.UTF-8

Written by John Gilmore and Jay Fenlason.
0.6.2
1.0.106
cleanup prefix=/usr/local

All clean!
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npm-g -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npm_g -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm@1.0.106 /usr/local/lib/node_modules/npm
It worked

이제 제대로 설치되었다. 

괜히 30분간 삽질했네. 
 
핵심) 설치시 오류나면 tar 버전을 확인후 최신 버전으로 업데이트
         그래도 오류나면 locale 확인. UTF-8로 locale을 변경한다음 설치
추천
2

댓글 4개

전체 23
개발자팁 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT