1. 초코 설치하기

Dec 11, 2023
1. 초코 설치하기

1. 홈페이지에 들어가서 파일 다운로드

https://chocolatey.org/로 가서 오른쪽 위의 install 버튼을 클릭하여 다운로드 한다.

2. 관리자 모드로 Powershell 열기

notion image
찾기에서 powershell을 검색한 후 관리자 권한으로 실행한다.

3. 초코 홈페이지 문서 확인

 
윈도우 현재 정책 확인(복사한 뒤 shift+insert하면 복붙이 가능)
Get-ExecutionPolicy
If it returns Restricted 제한된 상황이라면 아래와 같이 명령어 실행(실행 후 물어보는 것이 나오면 y입력)
Set-ExecutionPolicy AllSigned
윈도우 현재 정책 다시 확인(기존 powershell 끄고 다시 실행하여 입력)
Get-ExecutionPolicy
notion image
설치하기
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'))
 
💡
동시에 여러명이 요청하면 too many request라고 오류가 날 수 있으니, 나중에 다시 시도하자.
notion image
💡
다시 시도할 때는 위처럼 해당 폴더(C:\ProgramData\chocolatey)를 삭제하고 다시 시도하면 된다.
💡
ProgramData 폴더가 보이지 않는다면 c 탐색기 - 보기 - 숨긴항목 표시를 클릭하면 된다.

4. 초코 설치 확인

아래와 같이 입력했을 때 버전이 뜨면 설치 완료
choco --version
 
notion image
Share article
RSSPowered by inblog