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

  • 相关阅读:
    Linq to sql(八):继承与关系(二)
    Linq to sql(八):继承与关系(三)
    Linq to sql(八):继承与关系(五)
    div水平、垂直居中
    【转】C#读取QQ纯真IP数据库中的数据
    Flash被层遮挡的解决办法
    简易自定义分页
    网站来访者IP及地址记录
    安家第一篇
    天龙八部服务器端共享内存的设计
  • 原文地址:https://www.cnblogs.com/chucklu/p/5847205.html
Copyright © 2011-2022 走看看