zoukankan      html  css  js  c++  java
  • Installing Chocolatey

    旧版本

    https://chocolatey.org/install

    To install chocolatey now, open an administrative command prompt and paste the text from the box below that applies to the name of your shell and press enter. 

    第一步,在cmd里面执行一下命令

    @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateyin"

     

    第二步,在PowerShell中执行

    iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

    第三步,要在3.0以上的PowerShell中执行以下命令

     iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex

    新版本

    https://chocolatey.org/docs/installation

    Install with PowerShell.exe  (powershell 6.0无法运行安装命令,所以可以用win10自带的powershell 5.0运行下面的安装命令)

    With PowerShell, there is an additional step. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.

    • Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
    • Now run the following command:  (copy command text)
    Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

    Getting latest version of the Chocolatey package for download.
    Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.13.
    Extracting C:UserscluAppDataLocalTempchocolateychocInstallchocolatey.zip to C:UserscluAppDataLocalTempchocolateychocInstall...
    Installing chocolatey on this machine
    Creating ChocolateyInstall as an environment variable (targeting 'Machine')
    Setting ChocolateyInstall to 'C:ProgramDatachocolatey'
    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:ProgramDatachocolateylib'
    (i.e. C:ProgramDatachocolateylibyourPackageName).
    A shim file for the command line goes to 'C:ProgramDatachocolateyin'
    and points to an executable in 'C:ProgramDatachocolateylibyourPackageName'.

    Creating Chocolatey folders if they do not already exist.

    WARNING: You can safely ignore errors related to missing log files when
    upgrading from a version of Chocolatey less than 0.9.9.
    'Batch file could not be found' is also safe to ignore.
    'The system cannot find the file specified' - also safe.
    WARNING: Not setting tab completion: Profile file does not exist at
    'C:UserscluDocumentsWindowsPowerShellMicrosoft.PowerShell_profile.ps1'.
    Chocolatey (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

  • 相关阅读:
    看完两本书
    今夜,有点难过
    学习总结
    杂谈改变个人习惯
    最近一个月的工作学习总结
    lab项目之一阿森纳赛事指南客户端版本
    工资类程序数据库处理讨论 [数据加载(二)]
    SQL数值倍率实现问题....
    想用GDI+2.0做设计器,但在实现过程中遇到大麻烦
    这几天做工资类程序郁闷了,想写点东西理一下思路
  • 原文地址:https://www.cnblogs.com/chucklu/p/5847205.html
Copyright © 2011-2022 走看看