Error: Failed installing dependency: https://luarocks.org/luasec-0.6-2.src.rock - Could not find header file for OPENSSL
No file openssl/ssl.h in /usr/local/include
No file openssl/ssl.h in /usr/include
解决办法:
cd /usr/local/include
ln -s ../opt/openssl/include/openssl
kong-1.2.2 问题3:
这是因为没有安装openssl或者openssl文件位于其它目录中,如果是用brew命令安装的openssl,可以用brew info openssl找到openssl文件路径:
Error: Failed installing dependency: https://luarocks.org/luasec-0.7-1.src.rock - Could not find header file for OPENSSL
No file openssl/ssl.h in /usr/local/include
No file openssl/ssl.h in /usr/include
No file openssl/ssl.h in /include
You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command.
解决办法:
➜ ~ brew info openssl
openssl: stable 1.0.2s (bottled) [keg-only]
......
openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc
For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
......
用OPENSSL_DIR明确指定OPENSSL目录就可以了,如下:
luarocks make OPENSSL_DIR=/usr/local/opt/openssl CRYPTO_DIR=/usr/local/opt/openssl
title: Mac下Kong的安装与使用 date: 2018-03-08 16:02:59 tags: Kong
[TOC]
Mac下Kong的安装与使用(kong-0.12.2)
安装,由于使用homebrew各种报错,最后直接使用源码安装 kong install source
安装openresty
Mac OS X (macOS) 用户安装过程中由于pcre和openssl可能出错,直接使用brew单独安装 http://openresty.org/cn/installation.html
安装成功后使用list查询安装路径
安装 luarocks
编译安装 luarocks
安装 openresty
安装postgresql
在 Mac OS 安装
安装kong
设置环境变量
我这里是直接改了zsh的环境变量,不用zsh的可以改~/.bash_profile
启动kong
测试kong
PS:
问题1:
解决办法:
问题2:
解决办法:
kong-1.2.2 问题3:
这是因为没有安装openssl或者openssl文件位于其它目录中,如果是用brew命令安装的openssl,可以用
brew info openssl
找到openssl文件路径:解决办法:
用
OPENSSL_DIR
明确指定OPENSSL目录就可以了,如下:luarocks
清理历史安装包