Mac下brew安装rabbitmq
- 更新brew
brew udpate
- 安装rabbitmq
brew install rabbitmq
报错如下:
Error: The brew link
step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink sbin/cuttlefish
/usr/local/sbin is not writable.
You can try again using:
brew link rabbitmq
3. 然后根据提示,执行命令
brew link rabbitmq
报错如下:
Linking /usr/local/Cellar/rabbitmq/3.8.3…
Error: Could not symlink sbin/cuttlefish
/usr/local/sbin is not writable.
4. 于是加sudo,执行如下命令:
sudo brew link rabbitmq
报错如下:
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
- 重新搜索资料,执行命令:
sudo chown -R `whoami`:admin /usr/local/sbin
此处要小心,可以直接复制上述命令,如果自己敲命令的话,需要注意whoami
的两边是两个反引号,在键盘上数字”1“的左边,不是单引号。
报错如下:
chown: /usr/local/sbin: No such file or directory
- 创建目录/usr/local/sbin
mkdir /usr/local/sbin
报错如下:
mkdir: /usr/local/sbin: Permission denied
7. 加sudo
sudo mkdir /usr/local/sbin
8.然后再次执行以下命令(建议直接复制以下命令执行):
sudo chown -R `whoami`:admin /usr/local/sbin
9.再次执行以下命令
brew link rabbitmq
- 后台启动rabbitmq
brew services start rabbitmq
- 打开界面,输入账号和密码都是guest:http://localhost:15672/
参考:
https://blog.csdn.net/lom9357bye/article/details/79516457
https://blog.csdn.net/afanyusong/article/details/78538467
https://blog.blakesimpson.co.uk/page.php?id=89&title=fix-homebrew-error-usr-local-bin-is-not-writable-on-os-x-el-capitan
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/164072.html