➜ ~ /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
当前回答
也许不是很明显,但是除了上面的步骤之外,检查您的.zshprofile是否被任何多余的引号损坏。您还应该关闭所有终端实例。
其他回答
运行以下设置,然后就可以使用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)"
它帮助我。只需运行follow命令:
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/gureenkov56/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/gureenkov56/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
我只是做了echo 'eval ' $(/home/linuxbrew/。linuxbrew / bin /酿造shellenv)' >> ~/。zshrc,因为我正在使用哦-我的zsh。这样做之后应该就可以使用冲泡了。
如果您使用的是WSL2,请确保遵循linuxbrew的最终linux安装说明。
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
更新2023
export PATH="/opt/homebrew/bin:$PATH"
推荐文章
- 在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”程序?