Trying to install Kong on mac

Hi, I’m trying to follow the macOS installation guide (here)

I’m using postgres so first setup my kong user and a kong database (with kong user as owner). First issue is when I attempted to install kong using Homebrew I got the following:

==> **patch -p1 < /private/tmp/openresty--openresty-patches-20190107-89042-en0ivy/**

==> **patch -p1 < /private/tmp/openresty--openresty-patches-20190107-89042-en0ivy/**

Last 15 lines from /Users/****/Library/Logs/Homebrew/openresty/02.ngx_stream_lua-0.0.5_06-ssl-cert.patch:

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_timer.h

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_uthread.c

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_uthread.h

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_util.c

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_util.h

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_variable.c

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_variable.h

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_worker.c

patching file ngx_stream_lua-0.0.5/src/ngx_stream_lua_worker.h

patching file ngx_stream_lua-0.0.5/t/139-ssl-cert-by.t

patching file ngx_stream_lua-0.0.5/t/140-ssl-c-api.t

patching file ngx_stream_lua-0.0.5/t/cert/test2.crt

patching file ngx_stream_lua-0.0.5/t/cert/test2.key

patching file ngx_stream_lua-0.0.5/t/cert/test_ecdsa.crt

patching file ngx_stream_lua-0.0.5/t/cert/test_ecdsa.key

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):

https://github.com/kong/homebrew-kong/issues

It appeared to me that the issue was with openresty? So I installed openresty separately using Homebrew and it then appeared to install Kong with no issue.

I used kong migrations up and start kong (using postgres so no kong.conf).

However I get the following error when attempting to start kong:

Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:33: could not find OpenResty ‘nginx’ executable. Kong requires version 1.13.6.2

When running it with the debug option:

Error:

/usr/local/share/lua/5.1/kong/cmd/start.lua:57: /usr/local/share/lua/5.1/kong/cmd/utils/log.lua:63: bad argument #4 to ‘format’ (no value)

stack traceback:

[C]: in function ‘error’

/usr/local/share/lua/5.1/kong/cmd/start.lua:57: in function ‘cmd_exec’

/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:87>

[C]: in function ‘xpcall’

/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:44>

/usr/local/bin/kong:7: in function ‘file_gen’

init_worker_by_lua:47: in function <init_worker_by_lua:45>

[C]: in function ‘xpcall’

init_worker_by_lua:54: in function <init_worker_by_lua:52>

I have no idea what I’ve done wrong or if the info I’ve posted will be of any use :frowning:

+1 … same issue, I went down the same path, I’m still stuck … you figure it out?

No sorry, ended up using Docker.

Had same issued and worked around this way:

  1. Install OpenResty via Homebrew: brew install openresty/brew/openresty
  2. Create folder /usr/local/openresty
  3. Copy contents from /usr/local/Cellar/openresty/1.13.6.2 into it
  4. Check for /usr/local/openresty/nginx/sbin/nginx presence

If OK, try again.