PowerShell Scoop 命令安装及使用

PowerShell Scoop 命令安装及使用

Scoop 网址

官网
http://scoop.sh/

github
https://github.com/lukesampson/scoop

安装Scoop

  1. 第一步,打开powershell3.0+,输入以下代码,选择A【全是】 set-executionpolicy remotesigned -s cu
  2. 第二步,iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

安装异常

  1. 异常说明
使用“1”个参数调用“DownloadString”时发生异常:“无法连接到远程服务器” 所在位置 行:1 字符: 1>
+ iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
  1. 解决方法:
PS C:\Windows\system32> $wc = new-object net.webclient
PS C:\Windows\system32> $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
PS C:\Windows\system32> iex (new-object net.webclient).downloadstring('https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1')
  1. 安装成功
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding ~\scoop\shims to your path.
'lastupdate' has been set to '2020-02-17T17:20:44.3492878+08:00'
Scoop was installed successfully!
Type 'scoop help' for instructions.

使用

  1. scoop install …
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章