1

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.

4

2 回答 2

3

Why not to just use Brew?

brew install openresty

and thats all! :)

于 2014-03-11T20:24:07.597 回答
2

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

于 2013-05-01T10:41:11.973 回答