Macos 从脚本运行时未找到GCC
我正在尝试创建一个脚本,以便在OS X上获取和编译nginx。当我从终端运行Macos 从脚本运行时未找到GCC,macos,bash,gcc,nginx,Macos,Bash,Gcc,Nginx,我正在尝试创建一个脚本,以便在OS X上获取和编译nginx。当我从终端运行/configure--prefix=。时,我得到了您所期望的结果,但当我将其放入bash脚本时,我得到: checking for OS + Darwin 13.0.0 x86_64 checking for C compiler ... not found ./configure: error: C compiler cc is not found make: *** No rule to make targe
/configure--prefix=。
时,我得到了您所期望的结果,但当我将其放入bash脚本时,我得到:
checking for OS
+ Darwin 13.0.0 x86_64
checking for C compiler ... not found
./configure: error: C compiler cc is not found
make: *** No rule to make target `build', needed by `default'. Stop.
关于GCC丢失的原因有什么想法吗
path=$path:/usr/bin
)哪个cc
给了我/usr/bin/cc
,我可以从我的脚本中回显路径,它给了我/usr/bin:/usr/sbin:/sbin:/usr/local/bin
也从脚本中运行pwd
,并使其与交互路径相同。显然,这是一个版本问题,没有给我任何有用的错误数据。感谢您的帮助。请搜索您的错误消息错误:C编译器cc未找到
,还有几篇关于同一问题的帖子,其中一个解决方案可能会有所帮助。我所说的搜索SO是指google
以及查询中的stackoverflow.com
。