【问题标题】:Can't install Homebrew on Yosemite: /usr/local/lib already exists无法在 Yosemite 上安装 Homebrew:/usr/local/lib 已经存在
【发布时间】:2017-02-17 08:47:45
【问题描述】:

我第一次尝试在 Yosemite 上安装 Homebrew。我选择通过终端安装,虽然我不是这方面的专家。然后发生了这样的事情:

-e:161: warning: Insecure world writable dir /usr/local in PATH, mode 040777
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/lib

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/lib
Password:

然后我输入了我的密码。然后发生了这样的事情:

mkdir: /usr/local/lib: Not a directory
Failed during: /usr/bin/sudo /bin/mkdir -p /usr/local/lib

当我检查我的 /usr/local/ 目录时,已经有一个名为 lib 的文件。

This is a screen-capture of my /usr/local/ directory.

我似乎无法用这个安装 Homebrew。谁能告诉我下一步的建议?提前非常感谢。

【问题讨论】:

  • @MarkSetchell - 它确实对我有用。很抱歉没有勾选您的答案,我只是这个环境的新手。谢谢!

标签: homebrew osx-yosemite lib


【解决方案1】:

好吧,您至少需要暂时重命名/usr/local/lib,因为它不属于自制软件,而且会妨碍您:

sudo mv /usr/local/lib /usr/local/oldlib

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-13
    • 2014-10-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-17
    • 1970-01-01
    • 1970-01-01
    • 2019-07-13
    相关资源
    最近更新 更多