[英]How to do alternative install of Homebrew
Ok, well it's just been one of those nights where you spend hours and hours trying to get something to work, and you just keep getting weird errors, so if someone could help me I would greatly appreciate. 好的,这只是您花费数小时努力工作的夜晚之一,并且您只会不断收到奇怪的错误,因此,如果有人可以帮助我,我将不胜感激。 After hours of trying to update Maven from 3.0.4 to 3.1.1 or 3.2.2 I've decided it's just not going to happen (I've tried almost everything I can find online, but I'm afraid to try to do to much in terminal) and I'm trying to install homebrew to make it easier.
经过数小时的尝试,将Maven从3.0.4更新到3.1.1或3.2.2(我已经尝试了几乎可以在网上找到的所有内容,但我害怕尝试这样做)到终端中的大部分),而我正在尝试安装自制软件,以使其更容易。 When I try to do the normal homebrew install I get an error that says:
当我尝试进行常规的自制程序安装时,出现错误消息:
dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk Referenced from: /usr/local/git/bin/git Expected in: /usr/lib/libSystem.B.dylib dyld:懒惰的符号绑定失败:找不到符号:___strlcpy_chk引用自:/ usr / local / git / bin / git预期存在于:/usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___strlcpy_chk Referenced from: /usr/local/git/bin/git Expected in: /usr/lib/libSystem.B.dylib dyld:未找到符号:___strlcpy_chk引用自:/ usr / local / git / bin / git预期存在于:/usr/lib/libSystem.B.dylib
Failed during: git init -q 在以下期间失败:git init -q
So then, I tried to do the alternative install method, but at this point I'm just so annoyed, and I don't get what it wants me to do. 因此,我尝试使用其他安装方法,但到现在为止,我感到非常恼火,而且我不了解它想要执行的操作。 If anyone could give me some at least kind of detailed explanation for what to do I would be extremely grateful.
如果有人至少可以给我一些关于如何做的详细说明,我将非常感激。
Here's where I'm looking at alternative installs: https://github.com/Homebrew/homebrew/wiki/Installation 这是我正在寻找替代安装的地方: https : //github.com/Homebrew/homebrew/wiki/Installation
The problem is I don't even really know what they mean by "untar" and "extract." 问题是我什至不真正了解“未处理”和“提取”的含义。
Thanks so much to anyone who can help 非常感谢任何可以提供帮助的人
When I enter 当我进入
ls -l /usr/local | pbcopy
I get: 我得到:
total 0
drwxr-xr-x 2 root wheel 68 Aug 11 03:34 apache-maven
drwxrwxr-x 81 root admin 2754 Jan 17 2014 bin
drwxrwxr-x 3 root admin 102 Feb 21 2013 etc
drwxr-xr-x 9 root wheel 306 Jul 25 14:54 git
drwxrwxr-x 3 root admin 102 Feb 21 2013 lib
drwxrwxr-x 4 root admin 136 Feb 20 2013 share
drwxr-xr-x 4 root wheel 136 Dec 14 2013 texlive
Edited 编辑
Ok, so let's do an alternative install of homebrew
: 好的,让我们来替代安装
homebrew
:
cd /usr/local
mkdir homebrew
curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C homebrew
If that works, you just need to find the directory where the file brew
is located and then add that to your PATH 如果可行,您只需要找到文件
brew
所在的目录,然后将其添加到PATH中即可
So 所以
find /usr/local -name brew
Let's suppose the previous command results in 假设前面的命令导致
/usr/local/homebrew/bin/brew
we take brew
off the end (because we want to know its directory only) and we add that to the start of our PATH 我们将
brew
结束(因为我们只想知道它的目录),然后将其添加到PATH的开头
export PATH=/usr/local/homebrew/bin:$PATH
Now we should be able to run 现在我们应该可以运行了
brew doctor
Also, we need to add that export PATH=....
command to our login sequence so our shell knows how to find brew
every time we login. 同样,我们需要在我们的登录序列中添加
export PATH=....
命令,以便外壳程序每次登录时都知道如何查找brew
。 So add that line to the end of your ~/.profile
因此,将该行添加到
~/.profile
的末尾
Original Answer 原始答案
Ok, take a deep breath, and relax :-) 好吧,深吸一口气,放松一下:-)
homebrew
is a great choice on the Mac, so the pain should be worth it. 在Mac上,
homebrew
是一个不错的选择,因此痛苦值得。 I suspect you have a customised PATH
and customised environment variables which are stopping the homebrew
installation. 我怀疑您有一个自定义的
PATH
和自定义的环境变量正在停止homebrew
安装。 You can either set your PATH
and environment variables back to their default settings, or, if that is simpler, just add a new user to your Mac and log in as the new user with a standard environment and then install homebrew
using the standard method. 您可以将
PATH
和环境变量设置回其默认设置,或者,如果更简单,只需将新用户添加到Mac,然后以标准环境的新用户身份登录,然后使用标准方法安装homebrew
。
To look at your PATH
and environment variables, use these commands: 要查看您的
PATH
和环境变量,请使用以下命令:
echo $PATH
set
or 要么
set | grep -i LIB
to look for any customised DYLD_LIBRARY_PATH 查找任何自定义的DYLD_LIBRARY_PATH
Once you have it installed, try running 安装完成后,尝试运行
brew doctor
to check your setup before adding maven and other packages. 在添加Maven和其他软件包之前检查设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.