背景之目的:使用homebrew安装ffmpeg
操作系统:mac os 10.15
之前安装homebrew多次出错:
命令:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew命令显示正常,但是无法使用brew,会出现下面错误
使用时提示错误:
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
后使用知乎上的一个版本安装homebrew:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
(其中地址已经替换为国内网址)
幸运的~安装成功了
然后再source一下:
source /Users/zhengxuli/.zprofile