油管下载利器:youtube-dl
by admin
Mac 打开终端,按照官方安装教程:
https://github.com/ytdl-org/youtube-dl/blob/master/README.md#installation
执行:
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
遇到错误:
Failed to create the file /usr/local/bin/youtube-dl: No such file or directory.
先手动建立文件夹:
sudo mkdir -p /usr/local/bin/
即可成功安装。
也可使用更为流行的 Homebrew 进行安装。
https://brew.sh/
2021年2月5日更新 Homebrew 已正式支持 M1 芯片设备
https://brew.sh/2021/02/05/homebrew-3.0.0/
运行安装 Homebrew:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
新版路径变为 /opt/homebrew/,安装成功后会提示设置 PATH 路径:
echo ‘eval “$(/opt/homebrew/bin/brew shellenv)”‘ >> /Users/系统用户名/.zprofile
eval “$(/opt/homebrew/bin/brew shellenv)”
如果不希望上传分析数据:
brew analytics off
运行安装 youtube-dl:
brew install youtube-dl
安装 ffmpeg 用于合并音视频
https://formulae.brew.sh/formula/ffmpeg
brew install ffmpeg
评论