在macOS上更新GNU make [英] Updating GNU make on macOS
问题描述
我从此处(make-4.2.1.tar.gz)并按照展开文件夹中存在的INSTALL文件中找到的说明进行安装.现在,我在外壳程序中运行 make -v
,但仍然可以看到系统看到的是旧版本:
I downloaded GNU make 4.2.1 from here (make-4.2.1.tar.gz) and installed it following the instruction found in the INSTALL file that is present in the expanded folder.
Now I run make -v
in the shell and I still get that the system sees the old version:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
有什么建议吗?
我正在使用macOS 10.12.3机器.
预先感谢.
Any suggestion?
I'm working on a macOS 10.12.3 machine.
Thanks in advance.
推荐答案
不好的做法是更改/usr/bin
的内容.最好的方法是在PATH中将/usr/local/bin
放在/usr/bin
之前.将以下内容添加到您的〜/.bashrc
中:
It is bad practice to alter the contents of /usr/bin
. The best way is to have /usr/local/bin
before /usr/bin
in your PATH. Add the following to your ~/.bashrc
:
[[ "$PATH" = */usr/local/bin* ]] || PATH="/usr/local/bin:$PATH"
这篇关于在macOS上更新GNU make的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!