您的位置:首页 > 移动开发

macos 安装openresty make: /Applications/Xcode: No such file or directory

2015-03-07 23:26 489 查看
openresty官方地址:http://openresty.org/

将openresty安装到macos上

sudo ./configure --prefix=../
报错了make: /Applications/Xcode: No such file or directory
解决方法:
查一下xcrun查找cmd tool时的路径

$ xcode-select -p
/Applications/Xcode 5.1.1.app/Contents/Developer

原来是Xcode 5.1.1.app

$ sudo xcode-select -r
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

在sudo ./configure --prefix=../ 还是报上面的错误

解决方法:

sudo ln -s /Applications/Xcode\ 5.1.1.app /Applications/Xcode
/Applications/Xcode.app/Contents/Developer


再次运行 sudo ./configure --prefix=../ 报错:./configure: error: the HTTP rewrite module requires the PCRE library
说是缺少PCRE library,那就安装呗。
在安装之前先安装brew:网址:http://brew.sh/ 安装命令:

sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"[/code] 安装PCRE命令:

brew install pcre

不知道什么原因brew在我的电脑上不好用,搞了半天,果断换工具 macPorts 下载地址及方法见:http://www.macports.org/

注意一定要将/opt/local/bin和/opt/local/sbin添加到$PATH中

export PATH=/opt/local/bin:$PATH

export PATH=/opt/local/sbin:$PATH

如果第一次使用macPorts不好用,要先执行下更新操作

sudo port -v selfupdate

ok下面开始安装pcre

port install pcre

再次执行sudo ./configure --prefix=../ 终于通过了
之后就是make && make install
ok安装成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐