PS C:\Windows\system32> Test-Path C:\ProgramData\chocolatey\choco.exe
False
PS C:\Windows\system32> # 기존 폴더 삭제 >> Remove-Item -Path C:\ProgramData\chocolatey -Recurse -Force -ErrorAction SilentlyContinue >> >> # Chocolatey 새로 설치 >> 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’))
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/2.5.1.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/2.5.1 to C:\Users\yejin\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Users\yejin\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\yejin\AppData\Local\Temp\chocolatey\chocoInstall
Installing Chocolatey on the local machine
Creating ChocolateyInstall as an environment variable (targeting ‘Machine’)
Setting ChocolateyInstall to ‘C:\ProgramData\chocolatey’
WARNING: It’s very likely you will need to close and reopen your shell
before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to ‘C:\ProgramData\chocolatey\lib’
(i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to ‘C:\ProgramData\chocolatey\bin’
and points to an executable in ‘C:\ProgramData\chocolatey\lib\yourPackageName’.
Creating Chocolatey CLI folders if they do not already exist.
chocolatey.nupkg file not installed in lib.
Attempting to locate it from bootstrapper.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding…
경고: Not setting tab completion: Profile file does not exist at
‘C:\Users\yejin\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1’.
Chocolatey CLI (choco.exe) is now ready.
You can call choco from anywhere, command line or PowerShell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart PowerShell and/or consoles
first prior to using choco.
Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
PS C:\Windows\system32> # 현재 세션에 Chocolatey PATH 추가
$env:Path += “;C:\ProgramData\chocolatey\bin”
확인
choco –version
2.5.1
PS C:\Windows\system32> # Git 설치
choco install git -yGitHub CLI 설치
choco install gh -y
Chocolatey v2.5.1
Installing the following packages:
git
By installing, you accept licenses for the packages.
Downloading package from source ‘https://community.chocolatey.org/api/v2/’
Progress: Downloading chocolatey-compatibility.extension 1.0.0… 100%
chocolatey-compatibility.extension v1.0.0 [Approved]
chocolatey-compatibility.extension package files install completed. Performing other installation steps.
Installed/updated chocolatey-compatibility extensions.
The install of chocolatey-compatibility.extension was successful.
Deployed to ‘C:\ProgramData\chocolatey\extensions\chocolatey-compatibility’
Downloading package from source ‘https://community.chocolatey.org/api/v2/’
Progress: Downloading chocolatey-core.extension 1.4.0… 100%
chocolatey-core.extension v1.4.0 [Approved]
chocolatey-core.extension package files install completed. Performing other installation steps.
Installed/updated chocolatey-core extensions.
The install of chocolatey-core.extension was successful.
Deployed to ‘C:\ProgramData\chocolatey\extensions\chocolatey-core’
Downloading package from source ‘https://community.chocolatey.org/api/v2/’
Progress: Downloading git.install 2.51.2… 100%
git.install v2.51.2 [Approved]
git.install package files install completed. Performing other installation steps.
Using Git LFS
Installing 64-bit git.install…
git.install has been installed.
git.install installed to ‘C:\Program Files\Git’
git.install can 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 git.install was successful.
Deployed to ‘C:\Program Files\Git\’
Downloading package from source ‘https://community.chocolatey.org/api/v2/’
Progress: Downloading git 2.51.2… 100%
git v2.51.2 [Approved]
git package files install completed. Performing other installation steps.
The install of git was successful.
Deployed to ‘C:\ProgramData\chocolatey\lib\git’
Chocolatey installed 4/4 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Enjoy using Chocolatey? Explore more amazing features to take your
experience to the next level at
https://chocolatey.org/compare
Chocolatey v2.5.1
Installing the following packages:
gh
By installing, you accept licenses for the packages.
Downloading package from source ‘https://community.chocolatey.org/api/v2/’
Progress: Downloading gh 2.83.0… 100%
gh v2.83.0 [Approved]
gh package files install completed. Performing other installation steps.
Installing 64-bit gh…
gh has been installed.
gh 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 gh 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).
PS C:\Windows\system32>