[윈도] chocolatey 로 nodejs 설치하기
2024. 12. 22. 03:56ㆍNode js
chocolatey 설치
(chocolatey 가 시스템에 설치되어 있지 않은 경우 다음을 따른다.
기존 설치된 chocolatey 를 삭제하려는 경우 C:\ProgramData\chocolatey 를 삭제하면 된다.)
1. PowerShell 을 관리자 권한으로 실행한다.
2. PowerShell 에서 다음을 실행한다.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
참고 URL : https://chocolatey.org/install#individual
chocolatey 에서 nodejs 패키지 검색하기
패키지 검색은 시스템을 변경하지 않으므로 PowerShelll 을 관리자권한으로 실행하지 않아도 됨
choco search nodejs | findstr nodejs
(search 뒤에 지정한 패키지명과 상관없이 전체 패키지가 모두 출력되므로 findstr 명령을 활용해서 다시 걸러주어야만 원하는 패키지를 찾을 수 있다.)
PS C:\> choco search nodejs | findstr nodejs
nodejs 23.5.0 [Approved]
nodejs.commandline 6.11.0 [Approved] - Possibly broken
nodejs.install 23.5.0 [Approved]
nodejs-lts 22.11.0 [Approved]
chocolatey 에서 nodejs 설치하기
PowerShell 을 관리자 권한으로 연 상태에서 다음을 실행한다. (아래의 예에서는 LTS 버전을 설치)
choco install nodejs-lts
PS C:\> choco install nodejs-lts
Chocolatey v2.4.1
Installing the following packages:
nodejs-lts
By installing, you accept licenses for the packages.
Downloading package from source 'https://community.chocolatey.org/api/v2/'
Progress: Downloading nodejs-lts 22.11.0... 100%
nodejs-lts v22.11.0 [Approved]
nodejs-lts package files install completed. Performing other installation steps.
The package nodejs-lts wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y
Installing 64 bit version
Installing nodejs-lts...
nodejs-lts has been installed.
nodejs-lts may be able to be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of nodejs-lts was successful.
Software installed as 'MSI', install location is likely default.
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
'Node js' 카테고리의 다른 글
[리눅스/안드로이드] node js (0) | 2024.06.16 |
---|---|
nvm 으로 Node.js 설치하기 (0) | 2024.03.20 |