When I reconfigured openresty with --with-ld-opt="-Wl,-rpath,/usr/lib" it works now.
./configure --with-luajit --sbin-path=/usr/sbin --with-http_geoip_module --pid-path=/var/run/nginx.pid --with-http_stub_status_module --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-openssl=../../openssl-1.0.2n --with-ld-opt="-Wl,-rpath,/usr/lib"
any idea why it didn't work when I added
/usr/lib to
lua_package_cpath but worked with
--with-ld-opt option?
On Thursday, October 18, 2018 at 11:24:13 AM UTC+5:30, Nishant Kumar wrote:
Hi,
error loading module 'as_lua' from file '/usr/lib/lua/5.1/as_lua.so': libaerospike.so: cannot open shared object file: No such file or directory
`as_lua.so` is Lua wrapper generated using Aerospike-c-client.
Here is my config and code:
#config
lua_package_cpath ";/usr/local/openresty/lualib/?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/socket/?.so;/usr/lib/lua/5.1/?.so;/usr/lib64/lua/5.1/?.so;/usr/local/lib/?.so;/usr/lib/?.so";
#code in content_by_lua_file
local as = require("as_lua")
both exist in CPath:
$] sudo find / -name 'as_lua.so'
/usr/lib/lua/5.1/as_lua.so
$] sudo find / -name 'libaerospike.so'
/usr/lib/lua/5.1/libaerospike.so
/usr/lib/libaerospike.so
$] nginx -v
nginx version: openresty/1.13.6.1
It seems like linking issue. Can someone please guide me what am I missing here?