"우분투16 node.js 설치"의 두 판 사이의 차이

(새 문서: ==확인== <source lang='cli'> root@zetawiki:~# node -v The program 'node' can be found in the following packages: * node * nodejs Try: apt-get install <selected package> </source>)
 
 
(사용자 4명의 중간 판 41개는 보이지 않습니다)
1번째 줄: 1번째 줄:
 
{{다른뜻|CentOS node.js 설치}}
{{다른뜻|윈도우 node.js 설치}}
{{테스트|Ubuntu 14, 16}}
==개요==
;우분투 node.js 설치
* [[node.js]]와 [[npm]]이 함께 설치됨


==확인==
==확인==
<source lang='cli'>
* 우분투 14
<syntaxhighlight lang='console'>
root@zetawiki:~# node -v
root@zetawiki:~# node -v
The program 'node' can be found in the following packages:
The program 'node' can be found in the following packages:
  * node
  * node
  * nodejs
  * nodejs-legacy
Try: apt-get install <selected package>
Try: apt-get install <selected package>
</source>
</syntaxhighlight>
* 우분투 16
<syntaxhighlight lang='console'>
root@zetawiki:~# node -v
-bash: node: command not found
root@zetawiki:~# npm -v
-bash: npm: command not found
</syntaxhighlight>
 
==설치==
* nodesource( node.js 최신버전 제공 )의 APT 저장소 추가
<syntaxhighlight lang='console'>
root@zetawiki:~# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
 
## Installing the NodeSource Node.js v6.x repo...
 
 
## Populating apt-get cache...
 
+ apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]       
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]     
... (생략)
Get:7 https://deb.nodesource.com/node_6.x xenial/main amd64 Packages [963 B]
Get:8 https://deb.nodesource.com/node_6.x xenial/main i386 Packages [959 B]
Fetched 109 kB in 1s (58.2 kB/s)                               
Reading package lists... Done
 
## Run `apt-get install nodejs` (as root) to install Node.js v6.x and npm
</syntaxhighlight>
* 설치
<syntaxhighlight lang='console'>
root@zetawiki:~# apt-get install nodejs
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 36 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_6.x xenial/main amd64 nodejs amd64 6.10.3-1nodesource1~xenial1 [10.1 MB]
Fetched 10.1 MB in 0s (12.1 MB/s)
Selecting previously unselected package nodejs.
(Reading database ... 103333 files and directories currently installed.)
Preparing to unpack .../nodejs_6.10.3-1nodesource1~xenial1_amd64.deb ...
Unpacking nodejs (6.10.3-1nodesource1~xenial1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (6.10.3-1nodesource1~xenial1) ...
</syntaxhighlight>
 
==확인 2==
<syntaxhighlight lang='console'>
root@zetawiki:~# node -v
v6.10.3
root@zetawiki:~# npm -v
3.10.10
</syntaxhighlight>
 
==같이 보기==
*[[우분투18 node.js 설치]]
*[[CentOS node.js 설치]]
*[[윈도우 node.js 설치]]
*[[node.js 버전 확인]]
*[[node.js]]
 
==참고==
*https://nodejs.org/en/download/package-manager/
 
[[분류: apt-get]]
[[분류: node.js]]

2020년 11월 2일 (월) 00:58 기준 최신판

  다른 뜻에 대해서는 CentOS node.js 설치 문서를 참조하십시오.
  다른 뜻에 대해서는 윈도우 node.js 설치 문서를 참조하십시오.

1 개요[ | ]

우분투 node.js 설치

2 확인[ | ]

  • 우분투 14
root@zetawiki:~# node -v
The program 'node' can be found in the following packages:
 * node
 * nodejs-legacy
Try: apt-get install <selected package>
  • 우분투 16
root@zetawiki:~# node -v
-bash: node: command not found
root@zetawiki:~# npm -v
-bash: npm: command not found

3 설치[ | ]

  • nodesource( node.js 최신버전 제공 )의 APT 저장소 추가
root@zetawiki:~# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

## Installing the NodeSource Node.js v6.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]        
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]      
... (생략)
Get:7 https://deb.nodesource.com/node_6.x xenial/main amd64 Packages [963 B]
Get:8 https://deb.nodesource.com/node_6.x xenial/main i386 Packages [959 B]
Fetched 109 kB in 1s (58.2 kB/s)                                 
Reading package lists... Done

## Run `apt-get install nodejs` (as root) to install Node.js v6.x and npm
  • 설치
root@zetawiki:~# apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 36 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_6.x xenial/main amd64 nodejs amd64 6.10.3-1nodesource1~xenial1 [10.1 MB]
Fetched 10.1 MB in 0s (12.1 MB/s)
Selecting previously unselected package nodejs.
(Reading database ... 103333 files and directories currently installed.)
Preparing to unpack .../nodejs_6.10.3-1nodesource1~xenial1_amd64.deb ...
Unpacking nodejs (6.10.3-1nodesource1~xenial1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (6.10.3-1nodesource1~xenial1) ...

4 확인 2[ | ]

root@zetawiki:~# node -v
v6.10.3
root@zetawiki:~# npm -v
3.10.10

5 같이 보기[ | ]

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}