Angelos Kapsimanis
Angelos Kapsimanis

Reputation: 999

Lua is not working in Openresty on Mac OS X

I am trying to install Openresty v.1.2.6.7 under Mac OS X 10.6. I am installing pcre with brew in order to satisfy the requirements (pcre is version 8.32) and run the configure script with the pcre directories specified and the --with-luajit option.

cd openresty-1.2.6.7

./configure --with-cc-opt="-I/usr/local/Cellar/pcre/8.32/include" \
            --with--ld-opt="-L/usr/local/Cellar/pcre/8.32/lib" |
            --with-luajit

I am using the example conf given in the Openresty guide:

http://openresty.org/#GettingStarted

and try to start nginx with it but I am getting the following error:

nginx: [emerg] unknown directive "content_by_lua"

I tried the same steps in Ubuntu (with the necessary changes in prerequisite packages and worked fine). Any suggestion is highly welcome.

Upvotes: 1

Views: 3764

Answers (2)

KSDaemon
KSDaemon

Reputation: 366

Why not to just use Brew?

brew install openresty

and thats all! :)

Upvotes: 3

Angelos Kapsimanis
Angelos Kapsimanis

Reputation: 999

After a couple of days I found it. I installed seperately LuaJIT with brew and used its libraries and header in building openresty.

cd openresty-1.2.6.7

./configure --with-cc-opt="-I/usr/local/Cellar/pcre/8.32/include 
                           -I/usr/local/Cellar/luajit/2.01/luajit2.0/include" \
            --with--ld-opt="-L/usr/local/Cellar/pcre/8.32/lib
                            -L/usr/local/Cellar/luajit/2.01/luajit2.0/lib" \                
            --with-luajit

Build it with

 make && make install 

and it worked

Upvotes: 2

Related Questions