在OSX上使用GNU Make 4.X [英] Using GNU Make 4.X on OSX
问题描述
我正在关注 https://ninenines.eu/docs/zh/cowboy/2.0/guide/getting_started/
这需要make.当我运行安装脚本时,提示告诉我使用make 4.1.我运行 brew install erlang git homebrew/dupes/make
which requires make. When I run the install scripts, the prompt tells me to use make 4.1 . I run brew install erlang git homebrew/dupes/make
然后酿造断开链接的&&brew link make
,但 make make
仍然是/usr/bin
,而 make -v
是3.8.
then brew unlink make && brew link make
but which make
is still /usr/bin
and make -v
is 3.8.
如何链接到正确的,更新的品牌?
How do I link to the correct, updated make?
编辑
export PATH =/usr/local/bin:$ PATH是我的〜/.bash_profile
export PATH=/usr/local/bin:$PATH is the first line of my ~/.bash_profile
推荐答案
您需要设置 PATH
,以使/usr/local/bin
位于前面,即之前 /usr/bin
,因为自制软件将其二进制文件放在/usr/local/bin
中.
You need to set your PATH
so that /usr/local/bin
is ahead of, i.e. before /usr/bin
because homebrew puts its binaries in /usr/local/bin
.
因此,对于一次性命令,您可以运行:
So, for a one-off command, you can run:
/usr/local/bin/make -v
但是,通常,您希望在 $ HOME/.profile
或 $ HOME/.bash_profile
中设置 PATH
:
but in general, you want to set your PATH
in your $HOME/.profile
or in $HOME/.bash_profile
like this:
export PATH=/usr/local/bin:$PATH
通常,您需要提供个人资料:
In general, you will need to source your profile:
source ~/.profile
或注销并在更改后重新登录以使其生效.
or log out and log back in again after changing it for it to take effect.
这篇关于在OSX上使用GNU Make 4.X的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!