【环境配置】从零开始在Windows10环境下安装配置Scoop

【环境配置】从零开始在Windows10环境下安装配置Scoop

[by_041]

41按照其他教程安装的时候总会遇到各种奇奇怪怪的没有记录的问题,于是在总结了一小时别人的教程后终于安装成功,并且把安装Scoop的全过程记录了下来,用白板机的小白也能顺利安装了噢ii(俺太难了、)

前期准备

  • 确保PowerShell版本在5或以上,.NetFrame版本在4.7或以上

  • C:\Windows\System32\drivers\etc\hosts文件的最后位置加一行199.232.68.133 raw.githubusercontent.com

    (验证:在cmdping raw.githubusercontent.com检查返回数据)

  • 配置下载Scoop位置【代码中的路径可按照喜好自定义】

    • PowerShell中输入以下代码

      $env:SCOOP='C:\software\Scoop' [Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')

    • 或者直接在系统环境变量中添加

      • 变量名:SCOOP
      • 变量值:C:\software\Scoop
  • 若在后续过程中安装失败,再次安装前请将上方位置的Scoop文件夹删除

    (否则虽然没有安装成功但也会显示已安装信息:Scoop is already installed. Run 'scoop update' to get the latest version.

  • 配置Scoop下载文件位置,在PowerShell中输入以下代码【代码中的路径可按照喜好自定义】:

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

开始安装

  • PowerShell中的输入命令以及得到的反馈:
PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned -scope CurrentUser                                             
执行策略更改
执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如 https:/go.microsoft.com/fwlink/?LinkID=135170
中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?
[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“N”): y

PS C:\WINDOWS\system32> iwr -useb get.scoop.sh | iex 
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding C:\software\Scoop\shims to your path.
'lastupdate' has been set to '2021-03-12T21:39:07.6614001+08:00'
Scoop was installed successfully!
Type 'scoop help' for instructions.//耶,如果有这一行就代表安装完成了,保险起见下面我们来验证一下


PS C:\WINDOWS\system32> scoop help                                                                                      Usage: scoop <command> [<args>]

Some useful commands are:

alias       Manage scoop aliases
bucket      Manage Scoop buckets
cache       Show or clear the download cache
checkup     Check for potential problems
cleanup     Cleanup apps by removing old versions
config      Get or set configuration values
create      Create a custom app manifest
depends     List dependencies for an app
export      Exports (an importable) list of installed apps
help        Show help for a command
hold        Hold an app to disable updates
home        Opens the app homepage
info        Display information about an app
install     Install apps
list        List installed apps
prefix      Returns the path to the specified app
reset       Reset an app to resolve conflicts
search      Search available apps
status      Show status and check for new app versions
unhold      Unhold an app to enable updates
uninstall   Uninstall an app
update      Update apps, or Scoop itself
virustotal  Look for app's hash on virustotal.com
which       Locate a shim/executable (similar to 'which' on Linux)

Type 'scoop help <command>' to get help for a specific command.
PS C:\WINDOWS\system32>
  • 好了,恭喜你完成Scoop的安装了!!

一些网站:
https://rasa.github.io/scoop-directory/by-score
https://rasa.github.io/scoop-directory/by-bucket

一个博客,有介绍Scoop的一些操作(慎用哦):
设置代理(不建议使用hhh):scoop config proxy 127.0.0.1:8118
配置bucket:scoop bucket add 名 地址

猜你喜欢

转载自blog.csdn.net/qq_42710619/article/details/114709291