Win11下Scoop与Annie安装
scoop使用指南
一、安装前环境确认 1.PowerShell版本要求scoop官网中提到PowerShell要大≥5.1版本
查看powershell 版本的命令“Get-Host | Select-Object Version”
PS C:\Users\chenky190417>Get-Host | Select-Object Version
Version
-------
5.1.22621.169
2.NET框架版本需要.NET 框架 4.5(或更高版本),我这里安装了6.0版本。
二、安装ScoopScoop是Windows的命令行安装程序,是一个强大的包管理工具。可以在github上找到其项目的相关信息,项目网址。
github网址
码云网址
1. 安装scoop通过scoop官网下面的界面给出了安装方法
详见scoop安装readme
(1) 制定执行策略,保证允许本地脚本的执行
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
执行策略选择Y
(2) 安装scoop
irm get.scoop.sh | iex
或下面的命令也不行:
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
都出错,提示如下:
Initializing...
Running the installer as administrator is disabled by default, see https://github.com/ScoopInstaller/Install#for-admin for details.
Abort.
表示作为管理员运行installer默认是被禁止的,详见细节,这里给出了解决方案,采用新admin对应的命令
1.1 用默认安装路径的方式安装我采用命令“iex “& {$(irm get.scoop.sh)} -RunAsAdmin””
PS C:\Users\chenky190417>iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
Initializing...
Downloading...
Extracting...
Creating shim...
Adding ~\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.
安装过程杀毒软件是否允许操作,允许就可以了。
安装后默认的路径是C:\Users
如果要按照到指定目录,详见scoop安装readme
.\install.ps1 -RunAsAdmin -ScoopDir 'D:\Program Files\scoop' -ScoopGlobalDir 'D:\Program Files\ScoopApps'
可根据自己的需求来指定这两个按照位置
安装的日志信息如下:
PS C:\Users\chenky190417>.\install.ps1 -RunAsAdmin -ScoopDir 'D:\Program Files\scoop' -ScoopGlobalDir 'D:\Program Files\ScoopApps'
Initializing...
Downloading...
Extracting...
Creating shim...
Adding D:\Program Files\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.
2. 验证是否安装成功通过命令“scoop help”,安装成功可以看到help信息,如下:
PS C:\Users\chenky190417>scoop help
Usage: scoop[]
Available commands are listed below.
Type 'scoop help' to get more help for a specific command.
Command Summary
------- -------
alias Manage scoop aliases
bucket Manage Scoop buckets
cache Show or clear the download cache
cat Show content of specified manifest.
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, in the order they'll be installed
download Download apps in the cache folder and verify hashes
export Exports installed apps, buckets (and optionally configs) in JSON format
help Show help for a command
hold Hold an app to disable updates
home Opens the app homepage
import Imports apps, buckets and configs from a Scoopfile in JSON format
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
shim Manipulate Scoop shims
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 or url on virustotal.com
which Locate a shim/executable (similar to 'which' on Linux)
3. 卸载scoop卸载scoop的官方链接
用命令“scoop uninstall scoop”卸载,这个卸载命令,会删除你配置的scoop下面的所有软件,但卸载的时候提示提示没有对一些路径访问被拒绝,如下:
PS C:\Users\chenky190417>scoop uninstall scoop
WARN This will uninstall Scoop and all the programs that have been installed with Scoop!
Are you sure? (yN): y
Uninstalling '7zip'
Removing shim '7z.shim'.
Removing shim '7z.exe'.
Removing shim '7zFM.shim'.
Removing shim '7zFM.exe'.
Removing shim '7zG.shim'.
Removing shim '7zG.exe'.
WARN Couldn't remove ~\scoop\apps\7zip: 无法删除项 C:\Users\chenky190417\scoop\apps\7zip\22.01\Codecs: 对路径“Codecs”的访问被拒绝。.Exception
Uninstalling 'ffmpeg'
Removing shim 'ffmpeg.shim'.
Removing shim 'ffmpeg.exe'.
Removing shim 'ffplay.shim'.
Removing shim 'ffplay.exe'.
Removing shim 'ffprobe.shim'.
Removing shim 'ffprobe.exe'.
WARN Couldn't remove ~\scoop\apps\ffmpeg: 无法删除项 C:\Users\chenky190417\scoop\apps\ffmpeg\5.1.2\fonts: 对路径“fonts”的访问被拒绝。.Exception
Uninstalling 'lux'
Removing shim 'lux.shim'.
Removing shim 'lux.exe'.
WARN Couldn't remove ~\scoop\apps\lux: 无法删除项 C:\Users\chenky190417\scoop\apps\lux\current: 对路径“current”的访问被拒绝。.Exception
Couldn't remove ~\scoop\apps: 无法删除项 C:\Users\chenky190417\scoop\apps\7zip\22.01\Codecs: 对路径“Codecs”的访问被拒 绝。
用“del .\scoop -Force”强制删除scoop,发现删掉了scoop下buckets、cache、persist和shims文件夹,但apps下无法彻底删除,提示信息如下
PS C:\Users\chenky190417>del scoop
确认
C:\Users\chenky190417\scoop 处的项具有子项,并且未指定 Recurse 参数。如果继续,所有子项均将随该项删除。是否确实要继续?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为“Y”): y
del : 无法删除项 C:\Users\chenky190417\scoop\apps\7zip\22.01\Codecs: 对路径“Codecs”的访问被拒绝。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (Codecs:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DeleteSymbolicLinkFailed,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除项 C:\Users\chenky190417\scoop\apps\7zip\22.01\Formats: 对路径“Formats”的访问被拒绝。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (Formats:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DeleteSymbolicLinkFailed,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除目录 C:\Users\chenky190417\scoop\apps\7zip\22.01,因为该目录不为空。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (22.01:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除项 C:\Users\chenky190417\scoop\apps\7zip\current: 对路径“current”的访问被拒绝。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (current:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DeleteSymbolicLinkFailed,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除目录 C:\Users\chenky190417\scoop\apps\7zip,因为该目录不为空。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (7zip:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除项 C:\Users\chenky190417\scoop\apps\ffmpeg\5.1.2\fonts: 对路径“fonts”的访问被拒绝。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (fonts:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DeleteSymbolicLinkFailed,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除目录 C:\Users\chenky190417\scoop\apps\ffmpeg\5.1.2,因为该目录不为空。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (5.1.2:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除项 C:\Users\chenky190417\scoop\apps\ffmpeg\current: 对路径“current”的访问被拒绝。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (current:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DeleteSymbolicLinkFailed,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除目录 C:\Users\chenky190417\scoop\apps\ffmpeg,因为该目录不为空。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (ffmpeg:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除项 C:\Users\chenky190417\scoop\apps\lux\current: 对路径“current”的访问被拒绝。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (current:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DeleteSymbolicLinkFailed,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除目录 C:\Users\chenky190417\scoop\apps\lux,因为该目录不为空。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (lux:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除目录 C:\Users\chenky190417\scoop\apps,因为该目录不为空。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (apps:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
del : 无法删除目录 C:\Users\chenky190417\scoop,因为该目录不为空。
所在位置 行:1 字符: 1
+ del scoop
+ ~~~~~~~~~
+ CategoryInfo : WriteError: (C:\Users\chenky190417\scoop:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand
尝试重启系统后用命令“del .\scoop -Force”强制删除,还是上面的提示,直接鼠标右键删除却可以删除掉
三、安装 lux(annie) 1.安装lux项目网址:https://github.com/iawia002/lux
开始安装lux,这过程也安装了ffmpeg等软件。
PS C:\Users\chenky190417>scoop install lux
Installing '7zip' (22.01) [64bit] from main bucket
7z2201-x64.msi (1.8 MB) [=====================================================================================] 100%
Checking hash of 7z2201-x64.msi ... ok.
Extracting 7z2201-x64.msi ... done.
Linking D:\Program Files\scoop\apps\7zip\current =>D:\Program Files\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...
'7zip' (22.01) was installed successfully!
Notes
-----
Add 7-Zip as a context menu option by running: "D:\Program Files\scoop\apps\7zip\current\install-context.reg"
Installing 'ffmpeg' (5.1.2) [64bit] from main bucket
ffmpeg-5.1.2-full_build.7z (45.2 MB) [========================================================================] 100%
Checking hash of ffmpeg-5.1.2-full_build.7z ... ok.
Extracting ffmpeg-5.1.2-full_build.7z ... done.
Linking D:\Program Files\scoop\apps\ffmpeg\current =>D:\Program Files\scoop\apps\ffmpeg\5.1.2
Creating shim for 'ffmpeg'.
Creating shim for 'ffplay'.
Creating shim for 'ffprobe'.
Persisting fonts
'ffmpeg' (5.1.2) was installed successfully!
Installing 'lux' (0.16.0) [64bit] from main bucket
lux_0.16.0_Windows_64-bit.zip (10.8 MB) [=====================================================================] 100%
Checking hash of lux_0.16.0_Windows_64-bit.zip ... ok.
Extracting lux_0.16.0_Windows_64-bit.zip ... done.
Linking D:\Program Files\scoop\apps\lux\current =>D:\Program Files\scoop\apps\lux\0.16.0
Creating shim for 'lux'.
'lux' (0.16.0) was installed successfully!
2. 使用lux下载视频下载示例命令:
lux "https://www.bilibili.com/video/BV1tf4y1t7ru/?p=4&spm_id_from=pageDriver&vd_source=3f19bdc2a5854868deb3a176235129a2"
下载后视频文件在C:\Users-o
参数,后面带上文件夹路径即可,下载视频的日志信息如下:
PS C:\Users\chenky190417>lux -o D:\download "https://www.bilibili.com/video/BV1tf4y1t7ru/?p=4&spm_id_from=pageDriver&vd_source=3f19bdc2a5854868deb3a176235129a2"
Site: 哔哩哔哩 bilibili.com
Title: 目标检测 YOLOv5 开源代码项目调试与讲解实战【土堆 x 布尔艺数】 P4 如何利用 YOLOv5 进行预测(一)
Type: video
Stream:
[16-12] -------------------
Quality: 流畅 360P hev1.1.6.L120.90
Size: 85.98 MiB (90156863 Bytes)
# download with: lux -f 16-12 ...
85.98 MiB / 85.98 MiB [======================================================================] 6.56 MiB p/s 100.00% 13s
Merging video parts into D:\download\目标检测 YOLOv5 开源代码项目调试与讲解实战【土堆 x 布尔艺数】 P4 如何利用 YOLOv5 进行预测(一).mp4
你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧