• 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

  • 相关阅读:
    CentOS Python 安装MySQL-python
    Ubuntu64位安装Adobe Reader 9.5.5
    Codeforces Round #316 (Div. 2) (ABC题)
    cocos2dx 3.2+ 项目创建与问题总汇
    Mongodb的索引
    uva 12083 Guardian of Decency (二分图匹配)
    Linux查看内存使用量和交换区使用量
    053第423题
    [Python]xlrd 读取excel 日期类型2种方式
    求解组合问题的一个迭代算法
  • 原文地址:https://www.cnblogs.com/chucklu/p/5847205.html
Copyright © 2020-2023  润新知