windows11にScoopとlux(annie)をインストール
記事ディレクトリ
参照リンク
Win11 での Scoop と Annie のインストール
1. インストール前の環境確認
1.PowerShell のバージョン要件
scoop の公式 Web サイトには、 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 Framework 4.5 (またはそれ以降)が必要です。ここではバージョン 6.0 をインストールしました。
2.スクープをインストールする
Scoop は、Windows 用のコマンドライン インストーラーであり、強力なパッケージ管理ツールです。そのプロジェクトに関する関連情報は、プロジェクトの URL である github で見つけることができます。
1.スクープを取り付ける
インストール方法は、スクープ公式ウェブサイトの下のインターフェースを介して提供されます
詳細については、scoop インストールの readme を参照してください
(1) ローカル スクリプトの実行を許可するための実行戦略を策定する
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
実行戦略の選択 Y
(2) スコップを取り付ける
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.
管理者としてインストーラーを実行することがデフォルトで禁止されていることを示します。詳細については詳細を参照してください。新しい管理者に対応するコマンドを使用して、ここで解決策を示します。
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<YOUR USERNAME>\scoop で、scoop を介してインストールされたアプリは C:\Users<YOUR USERNAME>\scoop\apps の下にあります。
1.2 インストールパスを指定してインストールする
指定したディレクトリに移動する場合は、scoop インストールの readme を参照してください。
.\install.ps1 -RunAsAdmin -ScoopDir 'D:\Program Files\scoop' -ScoopGlobalDir 'D:\Program Files\ScoopApps'
- -ScoopDir: 現在のユーザー ソフトウェアのインストール場所を設定します D:\Program Files\scoop
- -ScoopGlobalDir: グローバル ソフトウェアのインストール場所を設定します (つまり、すべてのユーザーが利用できるようにする必要があります)。
必要に応じて、これら 2 つの場所を指定できます。
インストールのログ情報は次のとおりです。
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」を使用すると、インストールが成功した後に次のようなヘルプ情報を確認できます。
PS C:\Users\chenky190417> scoop help
Usage: scoop <command> [<args>]
Available commands are listed below.
Type 'scoop help <command>' 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 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」コマンドを使用して削除を強制します。上記のプロンプトのままで、マウスの右ボタンを直接押して削除しますが、削除することはできます
3. lux(annie) をインストールする
1.ルクスをインストールする
プロジェクトのウェブサイト: 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<YOUR USERNAME> のパスにあります。指定したディレクトリにダウンロードする場合は、パラメータの後に-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