Hello!
On Mon, Jan 26, 2015 at 11:19 AM, Pradeep L wrote:
> i tried to install this rpm
> on my machine but i got dependency error " libluajit-5.1.so.2 not found
> ..".
> then i populated the environment variables LUAJIT_LIB and LUAJIT_INC on my
> machine and tried to install the rpm still i am getting the same dependency
> error .
>
You need to specify the following option for your ./configure command
while building nginx:
--with-ld-opt='-Wl,-rpath,/path/to/luajit/lib"
such that the LuaJIT path is added to your nginx executable's RPATH
header and the user does not have to specify the LD_LIBRARY_PATH
environment himself.
> my queries..
> Is it necessary to specify the path of luaJIT while building the nginx with
> lua module ?
Not necessary, but good to have. You can always specify
LD_LIBRARY_PATH at the runtime to change the LuaJIT library to use
without rebuilding nginx. But adding the RPATH to the nginx executable
is more handy when you don't want the capability to change the luajit
library easily at runtime (usually you don't).
> Cant we specify the path of luaJIT after building the nginx with lua module
> ?
Yes, by the LD_LIBRARY_PATH environment, for example:
export LD_LIBRARY_PATH=/path/to/your/luajit/lib:$LD_LIBRARY_PATH
You need to set it before starting nginx.
> How can i specify the luaJIT path to this rpm ?
>
Usually we specify RPATH in the executable for nonstandard locations
of the dependent libraries.
> i am newbie to nginx and lua so in need of your help .
>
It's *highly* recommended to use the OpenResty bundle to avoid such
troubles (and more down the road):
http://openresty.org/#Download
OpenResty takes care of RPATH and all other similar (and more
important) details automatically for you.
Regards,
-agentzh