查看: 231|回复: 0

[Windows] Windows 安装 Installing Chocolatey

 楼主| 发表于 2018-1-3 04:59:03 | 显示全部楼层 |阅读模式
在 Windows 的管理员 cmd 界面中运行下面的命令:

  1. @powershell -NoProfile -ExecutionPolicy Bypass -Command "[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH="%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"


  1. C:\WINDOWS\system32>@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

  2. Mode                LastWriteTime         Length Name
  3. ----                -------------         ------ ----
  4. d-----         1/2/2018   3:52 PM                chocInstall
  5. Getting latest version of the Chocolatey package for download.
  6. Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.8.
  7. Downloading 7-Zip commandline tool prior to extraction.
  8. Extracting C:\Users\YuCheng\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\YuCheng\AppData\Local\Temp\chocolatey\chocInstall...
  9. Installing chocolatey on this machine
  10. Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  11.   Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
  12. WARNING: It's very likely you will need to close and reopen your shell
  13.   before you can use choco.
  14. Restricting write permissions to Administrators
  15. We are setting up the Chocolatey package repository.
  16. The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  17.   (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
  18. A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  19.   and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

  20. Creating Chocolatey folders if they do not already exist.

  21. WARNING: You can safely ignore errors related to missing log files when
  22.   upgrading from a version of Chocolatey less than 0.9.9.
  23.   'Batch file could not be found' is also safe to ignore.
  24.   'The system cannot find the file specified' - also safe.
  25. chocolatey.nupkg file not installed in lib.
  26. Attempting to locate it from bootstrapper.
  27. PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
  28. WARNING: Not setting tab completion: Profile file does not exist at
  29. 'C:\Users\YuCheng\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
  30. Chocolatey (choco.exe) is now ready.
  31. You can call choco from anywhere, command line or powershell by typing choco.
  32. Run choco /? for a list of functions.
  33. You may need to shut down and restart powershell and/or consoles
  34. first prior to using choco.
  35. Ensuring chocolatey commands are on the path
  36. Ensuring chocolatey.nupkg is in the lib folder

  37. C:\WINDOWS\system32>



您需要 登录 才可以下载或查看,没有帐号?新用户

您需要登录后才可以回帖 登录 | 新用户



站长推荐上一条 /1 下一条

QQ|手机版|小黑屋|Archiver|帮助|OSSEZ (North Tecom)  

GMT+8, 2018-8-17 05:38

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表