安装Homebrew错误 [英] Installing in Homebrew errors

查看:146
本文介绍了安装Homebrew错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试安装rvm和ruby 1.9.2

Attempting to install rvm and ruby 1.9.2

我已经安装了自制软件和git,但由于获得权限错误而无法获得完整的更新.重新安装Snow Leopard并修复权限.

I already installed homebrew and git, but couldn't get complete updates because I kept getting permission errors. Re-installed Snow Leopard and repaired permissions.

现在这发生了...

$ brew install wget

$ brew install wget

错误:无法写入/usr/local/Cellar

Error: Cannot write to /usr/local/Cellar

推荐答案

sudo chown -R $USER /usr/local

您将必须使用那行代码来授予自己对/usr/local/的所有权.在使用官方文档顶部的ruby one-liner安装Homebrew之后,我必须自己完成此操作.对我来说就像是一种魅力.这应该是您唯一一次需要使用Homebrew进行sudo的时间.

You'll have to give yourself ownership of /usr/local/ using that line right there. I had to do this myself after using the ruby one-liner at the top of the official docs to install Homebrew. Worked like a charm for me. It ought to be the only time you'll ever need to sudo with Homebrew.

我不确定红宝石单眼纸是否能做到这一点.如果是这样,那么此后我系统上的其他东西便控制了/usr/local.

I'm not sure if the ruby one-liner does this. If it did, then something else on my system took control of /usr/local since.

编辑:我完全错过了,但是 @samvermette 没有(请参阅回复)对我的回答):如果您在上面运行此命令并通过自制软件安装了需要特殊用户权限的东西,例如mysql,请确保将这些权限放回原位(因为上面的命令为/usr/local中的所有内容提供了递归所有权,以您($USER).对于mysql,是…

Edit: I completely missed this, but @samvermette didn't (see replies to my answer): if you run this command above and have something installed via homebrew that requires special user permissions, like mysql, make sure to give those permissions back (as the above command gives recursive ownership to everything inside /usr/local to you ($USER). In the case of mysql, it's…

sudo chown -RL mysql:mysql /usr/local/mysql/data

这篇关于安装Homebrew错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆