Giter VIP home page Giter VIP logo

scoop-cn's Introduction

Scoop 应用库**加速

Scoop 在**使用的问题

Scoop 是一个很优秀的软件包管理工具,官方的安装说明也简单易懂,但是在**访问却可能在每个环节都会遇到无法下载的问题。依次会遇到的是:

  1. 首先从 GitHub Raw 下载 Scoop 安装脚本,此时下载会失败。
  2. 如果第一步成功后,会下载 Scoop 仓库存档Main 应用仓库存档,此时下载又会失败。
  3. 如果第二步成功后,会先下载 7-Zip 和 Git 来做后面的事,因为 7-Zip 的官网 也是会偶尔无法访问,Git 下载地址在 GitHub Releases,此时下载又会失败。
  4. 如果第三步成功后,会从官方 Main 应用仓库检出代码,地址在 GitHub 仓库,此时下载又会失败。
  5. 如果第四步成功后,更新 Scoop 时会从官方 Scoop 仓库检出代码,地址在 GitHub 仓库,此时下载又会失败。
  6. 后续添加、检出 extras 等应用库都会失败。

如果你使用 Scoop 没有遇到这些问题,恭喜你,后面的内容不用看了。

本应用库介绍

本应用库为了解决上述问题,把各个环节的下载地址替换成了国内可加速访问的地址。本应用库使用的是 GitHub ProxyGitHub Actions

特性有:

  1. 本应用库包含 Scoop 的安装脚本,用于国内用户初次下载安装 Scoop。
  2. 本应用库同时包含了 Scoop 官方的十个应用库:main、extras、versions、nirsoft、sysinternals、php、nerd-fonts、nonportable、java、games(可使用命令 scoop bucket known 查看),用一个库包含了各家的库,用户不用在多个地方搜索应用。
  3. 本应用库把应用的下载地址替换成了国内可加速访问的地址,真正做到能更快更方便地下载和安装应用。
  4. 本应用库每天自动更新一次

前提条件

PowerShell 版本在 5.1 或以上,如果没有 PowerShell 大于 5.1 版本,可以下载安装 PowerShell Core。运行以下命令查看:

$PSVersionTable.PSVersion.Major # should be >= 5.1

其次,允许本地运行 PowerShell 脚本,以管理员打开 PowerShell,运行以下命令,回答 Y:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

安装 Scoop 和 scoop-cn(推荐)

此方法会把安装 Scoop 过程中的地址都换成**可快速访问的地址,并设置好 Scoop,添加本仓库。打开 PowerShell,输入以下命令下载安装 Scoop:

irm https://mirror.ghproxy.com/https://raw.githubusercontent.com/duzyn/scoop-cn/master/install.ps1 | iex

或使用 jsDelivr 的地址:

irm https://cdn.jsdelivr.net/gh/duzyn/scoop-cn/install.ps1 | iex

安装成功后,会提示“scoop and scoop-cn was installed successfully!”

只添加 scoop-cn 仓库

如果已经安装了 scoop,不想重新安装可以按以下步骤进行:

  1. 添加本仓库,运行命令

    scoop bucket add scoop-cn https://mirror.ghproxy.com/https://github.com/duzyn/scoop-cn
  2. 把已经安装的 app 改为使用 scoop-cn 来更新。每个 app 安装后在 app 的 current 路径下有个 install.json,里面的 bucket 项的值改为 scoop-cn,这样就把已安装的 app 换到 scoop-cn 了。可以运行 scoop list 来检查替换成功。如果要批量修改,可以借助 grepWin 来写个正则表达式搜索替换这个值。

安装应用

搜索应用:

scoop search APPNAME

安装应用:

scoop install scoop-cn/APPNAME

查看帮助

要了解 Scoop 的更多用法,请查看 Scoop 官网。或运行命令查看简要的帮助:

scoop help

类似项目

macOS 和 Linux 上 Homebrew 可用的 homebrew-cn

scoop-cn's People

Contributors

duzyn avatar maoyeedy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scoop-cn's Issues

指定scoop安装目录和global apps 安装目录怎么办?

如果我想指定scoop安装目录和global apps 安装目录怎么办?官方文档是先下安装包,再指定参数。试图模仿尝试了一下。
把(irm https://ghproxy.com/https://raw.githubusercontent.com/duzyn/scoop-cn/master/install.ps1 | iex)的iex删了,(小白看不懂命令,猜这样就只是下载安装包,而不会去安装)
然后输入 (.\install.ps1 -? )
终端显示 (The term '.\install.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program.)
看起来这条路走不通,所以应该怎么做呢?

7zip.json在运行post_install阶段的时候报错。

PS C:\Users\xxx> scoop install https://ghproxy.com/raw.githubusercontent.com/duzyn/scoop-cn/master/bucket/7zip.json
Installing '7zip' (22.01) [64bit]
7z2201-x64.msi (1.8 MB) [===========================================================================] 100%
Checking hash of 7z2201-x64.msi ... ok.
Extracting 7z2201-x64.msi ... done.
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\22.01
Creating shim for '7z'.
Creating shim for '7zFM'.
Creating shim for '7zG'.
Creating shortcut for 7-Zip (7zFM.exe)
Persisting Codecs
Persisting Formats
Running post_install script...
Get-Content : 找不到路径“C:\Users\xxx\scoop\buckets\scoop-cn\scripts\7-zip\install-context.reg”,因为该
路径不存在。
所在位置 行:3 字符: 16

  • $content = Get-Content "$bucketsdir\scoop-cn\scripts\7-zip\$_"
    
  •            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\Users\xxx...all-context.reg:String) [Get-Content], Item
      NotFoundException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

search

使用 scoop search xxx 命令检索软件的时候,特别慢,需要2min才能出结果

更新/下载应用失败

scoop 是通过本仓库安装的:irm https://ghproxy.com/https://raw.githubusercontent.com/duzyn/scoop-cn/master/install.ps1 | iex

最近几天发现软件包安装/更新都会失败,终端输出如下:

~
> scoop update *
86box-roms: 4.0 -> 4.0.1
bitwarden: 2023.9.2 -> 2023.9.3
virtualbox-with-extension-pack-np: 7.0.10 -> 7.0.12
Updating 3 outdated apps:
Updating '86box-roms' (4.0 -> 4.0.1)
Downloading new version
Starting download with aria2 ...
Download: 10/18 18:37:39 [ERROR] CUID#8 - Download aborted. URI=https://github.com/86Box/roms/archive/refs/tags/v4.0.1.zDownload: Exception: [AbstractCommand.cc:312] errorCode=1 Network problem has occurred. cause:The requested address is nDownload: Download Results:
Download: gid   |stat|avg speed  |path/URI
Download: ======+====+===========+=======================================================
Download: 0a058e|ERR |       0B/s|C:/Users/myuser/scoop/cache/86box-roms#4.0.1#https_github.com_86Box_roms_archive_refs_tags_v4.0.1.zip
Download: Status Legend:
Download: (ERR):error occurred.
Download: aria2 will resume download if the transfer is restarted.
Download: If there are any errors, then see the log file. See '-l' option in help/man page for details.

ERROR Download failed! (Error 1) An unknown error occurred
ERROR https://github.com/86Box/roms/archive/refs/tags/v4.0.1.zip
    referer=https://github.com/86Box/roms/archive/refs/tags/
    dir=C:\Users\myuser\scoop\cache
    out=86box-roms#4.0.1#https_github.com_86Box_roms_archive_refs_tags_v4.0.1.zip

ERROR & 'C:\Users\myuser\scoop\apps\aria2\current\aria2c.exe' --input-file='C:\Users\myuser\scoop\cache\86box-roms.txt' --user-agent='Scoop/1.0 (+http://scoop.sh/) PowerShell/7.3 (Windows NT 10.0; Win64; x64; Core)' --allow-overwrite=true --auto-file-renaming=false --retry-wait=2 --split=8 --max-connection-per-server=8 --min-split-size=1M --console-log-level=warn --enable-color=false --no-conf=true --follow-metalink=true --metalink-preferred-protocol=https --min-tls-version=TLSv1.2 --stop-with-process=27140 --continue --summary-interval=0 --auto-save-interval=1

Please try again or create a new issue by using the following link and paste your console output:
https://ghproxy.com/https://github.com/duzyn/scoop-cn/issues/new?title=86box-roms%404.0.1%3a+download+via+aria2+failed

~ took 2s
x

有无什么建议?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.