win10中安装scoop

发布时间 2023-07-07 13:25:14作者: godmodel

win10中安装scoop

安装scoop中出现各种问题,鼓捣了一晚上才搞好。现记录安装过程以及出现的问题。

1.安装过程

1.1我是在国际网络的前提下进行的

1.2以管理员身份运行PowerShell

image-20230705232553607

1.2 查看PowerShell版本

$PSVersionTable.PSVersion

image-20230705233552118

  • PowerShell : 确保已安装 PowerShell 5.0 或更高版本。

    Windows 10 以及更高的版本默认安装的 PowerShell 5.0

1.3 我不想直接安装在C盘所以选择安装在了D盘

需要新建一个文件夹scoop

$env:SCOOP='D:\scoop' 
[Environment]::SetEnvironmentVariable('USERSCOOP', $env:SCOOP, 'User')

设置全局安装路径(需要管理员权限)

$env:SCOOP_GLOBAL='D:\scoop' 
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')

设置允许 PowerShell 执行本地脚本

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

安装 Scoop

iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin

image-20230706003810216