在OSX上使用GNU Make 4.X

编程入门 行业动态 更新时间:2024-10-28 08:21:36
本文介绍了在OSX上使用GNU Make 4.X的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在关注 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

本文发布于:2023-11-17 17:02:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1610392.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:OSX   GNU

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!