➜ ~ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-e:77: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040677
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
The current contents of /usr/local are bin CODEOFCONDUCT.md etc git lib Library LICENSE.txt munki README.md sbin share .git .github .gitignore
➜ ~ brew install maven
zsh: command not found: brew
当前回答
我只是做了echo 'eval ' $(/home/linuxbrew/。linuxbrew / bin /酿造shellenv)' >> ~/。zshrc,因为我正在使用哦-我的zsh。这样做之后应该就可以使用冲泡了。
其他回答
运行以下设置,然后就可以使用brew了
执行unintsall脚本:-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
设置Git Compression:- Git config——global core.compression 0
设置Git缓冲区大小:- Git config——global http。postBuffer 1048576000
运行安装脚本:— /bin/bash -c $(curl - ssl https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
你的电脑上已经安装了自制软件。你需要像这样修改你的PATH:
export PATH=/usr/local/bin:$PATH
或者从起始点执行brew:
/usr/local/bin/brew install maven
在我的MacBook (macOS Big Sur V 11.0.1)安装Homebrew后,我也遇到了同样的问题。
安装完成后,在控制台中会显示应该做什么:
==>下一步: -将Homebrew添加到/Users/USER/.zprofile中的PATH: echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/USER/.zprofile . sh Eval $(/opt/homebrew/bin/brew shellenv) -运行“brew help”开始
按顺序执行这两个命令,会将brew命令添加到PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/USER/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
请访问Homebrew官方网站。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
下一个步骤:
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
尝试:brew install hello
也许不是很明显,但是除了上面的步骤之外,检查您的.zshprofile是否被任何多余的引号损坏。您还应该关闭所有终端实例。
推荐文章
- 在OSX中永久设置PATH环境变量
- 如何停止mysqld
- Git显示“警告:永久添加到已知主机列表”
- 如何从远程SSH会话发送数据到本地剪贴板
- Docker- compose无法连接到Docker Daemon
- SSH端口转发~/。ssh /配置文件?
- 如何复制文件跨计算机使用SSH和MAC OS X终端
- Mac SQLite编辑器
- 在MacOS X上推荐用什么方式安装Node.js、nvm和npm ?
- 如何在Swift中删除视图的所有子视图?
- 如何在Mac OS Lion上从命令行启动MySQL服务器?
- 警告用户/local/mysql/data目录不属于mysql用户
- 崇高的文本从命令行
- 在Mac OS X上使用鼠标聚焦(加上自动提升)
- 我在哪里可以找到Mac OS X Lion的“make”程序?