Home  >  Article  >  Backend Development  >  [mac]brew install nginx, what should I do if a compilation error occurs?

[mac]brew install nginx, what should I do if a compilation error occurs?

WBOY
WBOYOriginal
2016-08-08 09:31:571053browse

The error is as follows:

==> Downloading http://nginx.org/download/nginx-1.6.2.tar.gz

Already downloaded: /Library/Caches/Homebrew/nginx-1.6. 2.tar.gz
==> ./configure --prefix=/usr/local/Cellar/nginx/1.6.2 --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path= /usr/local/Cel
+ Darwin 14.0.0 x86_64
checking for C compiler ... not found

./configure: error: C compiler clang is not found

Google it and there is an article The article mentioned that this was caused by Xcode not installing command line tools. However, I also used homebrew to install nginx on another machine and there was no problem. I checked the Xcode versions on both sides and found that there was a problem with 6.0.1. The latest 6.1.1 was OK, so I upgraded xcode and ran brew install nginx again, and it was OK

The above has introduced [mac] brew install nginx. What should I do if a compilation error occurs? , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn