bash: yt-dlp: 未找到命令,yt-dlp 不在路径上

bash: yt-dlp: 未找到命令,yt-dlp 不在路径上

当我尝试使用 yt-dlp 下载时,我从 Ubuntu 终端收到此错误消息

bash: yt-dlp: command not found

我使用这个命令来安装 yt-dlp

python3 -m pip install -U yt-dlp

当我收到这条消息后

WARNING: The scripts mid3cp, mid3iconv, mid3v2, moggsplit, mutagen-inspect and mutagen-pony are installed in '/home/appbox/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script yt-dlp is installed in '/home/appbox/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

如何解决并在 PATH 上添加yt-dlpand mid3cpmid3iconvmid3v2moggsplitmutagen-inspectand ?mutagen-pony

答案1

editor ~/.bashrc

搜索 PATH 变量的声明(或创建它),然后:

export PATH=~/.local/bin:$PATH

相关内容