Using GNU Make 4.X on OSX

…衆ロ難τιáo~ 提交于 2021-02-08 10:06:55

问题


I'm following https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/

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

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?

EDIT

export PATH=/usr/local/bin:$PATH is the first line of my ~/.bash_profile


回答1:


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

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.



来源:https://stackoverflow.com/questions/40871732/using-gnu-make-4-x-on-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!