如何在多用户MacOS Sierra设置上使用Homebrew [英] How to use Homebrew on a Multi-user MacOS Sierra Setup

查看:80
本文介绍了如何在多用户MacOS Sierra设置上使用Homebrew的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台Mac,可以在两名工程师之间共享.两者都有单独的用户帐户.两者都需要偶尔运行 brew update brew install ... .

I have a Mac that is shared between two engineers. Both have separate user accounts. Both need to run brew update and brew install... occasionally.

如何设置此设置而不会出现以下错误:/usr/local必须是可写的!?

How do I set this up without getting errors like: /usr/local must be writable!?

是的,每次他想使用brew时,我都可以让 UserA 接管/usr/local 的权限(与 UserB 相同)>),但这似乎是很多不必要的麻烦.

Yeah, I could have UserA take over the permissions of /usr/local every time he wants to use brew (and same with UserB), but that seems like a lot of unnecessary trouble.

推荐答案

请注意:截至2020年,此答案已过时.(但不能删除,因为它是可接受的答案.)

Hombrew将软件包安装在/usr/local 中,如果不破坏安装的许多软件包,您将无能为力.为所有用户添加读写权限,如下所示:

Hombrew installs packages in /usr/local, there is nothing you can do about that without breaking many of the packages it installs. Add read and write permissions for all users like this:

sudo chmod -R +rw /usr/local

请注意,因为这是一个系统文件夹,所以所有用户将共享相同的brew安装.一个用户可以删除其他人已经安装的软件包,依此类推.因此,请确保进行协调以避免出现问题.

Be aware the since this is a system folder, all users will share the same brew installation. One user can remove packages that others have installed, and so on. So make sure to coordinate to avoid problems.

这篇关于如何在多用户MacOS Sierra设置上使用Homebrew的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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