Skip to content

running nginx fails on luajit so after build #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Industrial opened this issue Nov 25, 2010 · 7 comments
Closed

running nginx fails on luajit so after build #8

Industrial opened this issue Nov 25, 2010 · 7 comments

Comments

@Industrial
Copy link

Hi.

$ export LUAJIT_LIB=/home/tom/Applications/LuaJIT-2.0.0.beta5/lib

$ export LUAJIT_INC=/home/tom/Applications/LuaJIT-2.0.0.beta5/include/luajit-2.0

$ ./configure --prefix=/home/tom/Applications/nginx-0.8.53 --add-module=/home/tom/Downloads/ngx_devel_kit --add-module=/home/tom/Downloads/lua-nginx-module

$ make -j

$ make install

$ /home/tom/Applications/nginx-0.8.53/sbin/nginx

nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

$

@chaoslawful
Copy link
Contributor

Hi,

Have you installed LuaJIT and made its shared library in your OS library search path?

@agentzh
Copy link
Member

agentzh commented Nov 25, 2010

Try

export LD_LIBRARY_PATH=/home/tom/Applications/LuaJIT-2.0.0.beta5/lib:$LD_LIBRARY_PATH

before starting nginx.

Cheers,
-agentzh

@chaoslawful
Copy link
Contributor

consider solved.

@jianfengye
Copy link

it is useful to me.

@maanas
Copy link

maanas commented Aug 4, 2012

Thanks. How can i add this in boot parameters so that i do not have to do it again.

@agentzh
Copy link
Member

agentzh commented Aug 5, 2012

Hello!

On Sat, Aug 4, 2012 at 1:16 PM, maanas
[email protected]
wrote:

Thanks. How can i add this in boot parameters so that i do not have to do it again.

One way is to specify RPATH while building Nginx, for example,

./configure --with-ld-opt="-Wl,-rpath,$LUAJIT_LIB"

This should work on almost everywhere, including Linux, Mac OS X,
FreeBSD, and Solaris.

My OpenResty bundle also uses this trick, see:

http://openresty.org

Best regards,
-agentzh

@sinabs
Copy link

sinabs commented Jun 2, 2015

ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2

zhuizhuhaomeng pushed a commit that referenced this issue Oct 19, 2021
==openresty==70603==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x621000001500,0x621000002181) and [0x62100000187f, 0x621000002500) overlap
    #0 0x7f3db1899ffe  (/lib64/libasan.so.5+0x99ffe)
    #1 0x9da926  (/usr/local/openresty-debug/nginx/sbin/nginx+0x9da926)
    #2 0x9dd1a1  (/usr/local/openresty-debug/nginx/sbin/nginx+0x9dd1a1)
    #3 0x4c89c6  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4c89c6)
    #4 0x5d1e4e  (/usr/local/openresty-debug/nginx/sbin/nginx+0x5d1e4e)
    #5 0x4c89c6  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4c89c6)
    #6 0x5b8583  (/usr/local/openresty-debug/nginx/sbin/nginx+0x5b8583)
    #7 0x4c89c6  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4c89c6)
    #8 0x4b4419  (/usr/local/openresty-debug/nginx/sbin/nginx+0x4b4419)
    #9 0x427f16  (/usr/local/openresty-debug/nginx/sbin/nginx+0x427f16)
    #10 0x7f3daff27554  (/lib64/libc.so.6+0x22554)
    #11 0x42d537  (/usr/local/openresty-debug/nginx/sbin/nginx+0x42d537)
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants