How to start Nginx?

Hello

Using OpenResty, I compiled and installed a Lua-capable Nginx in /tmp so
I
could experiment with it before replacing the current Nginx that was
installed through apt-get.

However, since files are located in non-standard locations, Nginx can’t
find
them:

/tmp/ngx_openresty-1.4.3.6/install/usr/local/openresty/nginx/sbin#
./nginx
./nginx: error while loading shared libraries: libluajit-5.1.so.2:
cannot
open shared object file: No such file or directory

FYI, here’s what tmp/ngx_openresty-1.4.3.6/install/usr/local/openresty/
contains:

drwxr-xr-x 6 root root 4096 Jan 21 16:01 luajit/
drwxr-xr-x 5 root root 4096 Jan 21 16:03 lualib/
drwxr-xr-x 6 root root 4096 Jan 21 16:01 nginx/

How should configure Debian so that Nginx find the files it needs?

Thank you.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,246792,246792#msg-246792

./nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot
open shared object file: No such file or directory
How should configure Debian so that Nginx find the files it needs?

You can always write ‘ldd nginx’ (also for every other executable on
linux)
to see where the librariers (*.so) should be located (it will indicate
‘not
found’ and display path).

rr

On 1/24/14, 9:55 AM, Reinis R. wrote:

./nginx: error while loading shared libraries: libluajit-5.1.so.2:
cannot open shared object file: No such file or directory
How should configure Debian so that Nginx find the files it needs?

You can always write ‘ldd nginx’ (also for every other executable on
linux) to see where the librariers (*.so) should be located (it will
indicate ‘not found’ and display path).

Perhaps Yichun Z. (agentzh) will have a simpler approach, but you can
also consider setting up a virtual machine using VirtualBox or some
other program, and testing it that way. Once you are convinced that it
behaves as expected for your use case, you can install it and try it in
production.


Jim O.

Also, in Debian you can use apt-file to find the necessary lib:
aptitude install apt-file && apt-file update
apt-file search libluajit
or
apt-file search -x ‘libluajit.*.so$’

On Friday, January 24, 2014 09:43:55 AM Shohreh wrote:

./nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot

How should configure Debian so that Nginx find the files it needs?

Thank you.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,246792,246792#msg-246792


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Best regards,
Styopa S…

Thanks Yichun. This is what I ended up doing, because “make install
DESTDIR=blah” triggered other errors.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,246792,246860#msg-246860

Thanks for the idea, but I had to compile Nginx because the one
available in
the depot didn’t have Lua compiled, and I’d rather compile both Nginx
and
Lua at the same time.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,246792,246861#msg-246861

Hello!

On Fri, Jan 24, 2014 at 6:43 AM, Shohreh wrote:

Using OpenResty, I compiled and installed a Lua-capable Nginx in /tmp so I
could experiment with it before replacing the current Nginx that was
installed through apt-get.

However, since files are located in non-standard locations, Nginx can’t find
them:

You should use the command

./configure --prefix=/tmp/openresty --with-luajit

to build your openresty.

You cannot move already installed openresty directory tree to other
places because we use RPATH in the “nginx” executable file’s header to
locate dynamic libraries (like the libluajit-5.1.so.2 file).

Regards,
-agentzh

Thanks, but this is for an appliance, so a virtual machine is too big.

Recompiling with “–prefix” solved the problem.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,246792,246862#msg-246862

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs