ubuntu에 nodejs, Truffle, ganache-cli 설치

2023. 2. 3. 00:45카테고리 없음

728x90

사전환경

ubuntu 20.04(LTS)


node js 설치

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt-get install -y nodejs

위 명령어 입력 후 version 명령어로 설치됐는지 확인한다.

#npm 버전 확인
npm --version

#node 버전 확인
node --version

위와 같이 버전이 나오면 성공이다.

참고로 nodejs는 version이 짝수(2, 4, 8.. etc) 일 경우 LTS이고 홀수(1, 3, 5... etc) 일 경우 Current버전으로 버전관리가 되어있다.


Truffle설치

sudo npm install -g truffle

위 명령어 입력 후 version 명령어로 설치됬는지 확인한다.

 

위와 같이 버전이 나오면 성공이다.


ganache-cli설치

sudo npm install -g ganache-cli

위 명령어 입력 후 version 명령어로 설치됐는지 확인한다.

위와 같이 버전이 나오면 성공이다.


nodejs linux git 홈페이지

https://github.com/nodesource/distributions/blob/master/README.md

 

GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions

NodeSource Node.js Binary Distributions. Contribute to nodesource/distributions development by creating an account on GitHub.

github.com