Closed chris-jansson closed 5 years ago
From your output, you installed it to /usr/lib64 but don't have that in your package.cpath
. either your luarocks is configured incorrectly, or your lua cpath is.
Ok, I can add that to my cpath. What exactly do I need to point to in /usr/lib64?
I see the file /usr/lib64/lua/5.1/_openssl.so
, is that it? I added /usr/lib64/lua/5.1/?.so
to my cpath, but since I'm using require 'openssl.digest'
, the loader tries to find _openssl/digest.so
the loader tries to find
_openssl/digest.so
I should then try and find _openssl.so
after. (which I can see in your earlier error messages)
So is my lua.cpath
correct then?
So is my
lua.cpath
correct then?
You haven't shown it to me since you made the above changes.
Sure. I added /usr/lib64/lua/5.1/?.so
to my cpath, so this is its new value:
/usr/lib64/lua/5.1/?.so;/usr/lib64/lua/5.1/loadall.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so
Inside the /usr/lib64/lua/5.1
directory, the only OpenSSL related file is _openssl.so
. So, when I try to require openssl.digest
(based on the examples in the docs), I get this error:
lua entry thread aborted: runtime error: /usr/share/lua/5.1/openssl/digest.lua:1: module '_openssl.digest' not found:
no field package.preload['_openssl.digest']
no file './_openssl/digest.lua'
no file '/usr/share/nginx-luajit-2.0.5/_openssl/digest.lua'
no file '/usr/local/share/lua/5.1/_openssl/digest.lua'
no file '/usr/local/share/lua/5.1/_openssl/digest/init.lua'
no file '/usr/share/lua/5.1/_openssl/digest.lua'
no file '/usr/share/lua/5.1/_openssl/digest/init.lua'
no file ' /usr/lib64/lua/5.1/_openssl/digest.so'
no file '/usr/lib64/lua/5.1/loadall.so'
no file './_openssl/digest.so'
no file '/usr/local/lib/lua/5.1/_openssl/digest.so'
no file '/usr/lib/lua/5.1/_openssl/digest.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file ' /usr/lib64/lua/5.1/_openssl.so'
no file '/usr/lib64/lua/5.1/loadall.so'
no file './_openssl.so'
no file '/usr/local/lib/lua/5.1/_openssl.so'
no file '/usr/lib/lua/5.1/_openssl.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
I can see in the trace that it is checking the updated cpath.
I notice a space at the start of the /usr/lib64/lua/5.1/_openssl.so
path.
Aha. Working now. So it was just a cpath issue after all. Thanks
I'm having an issue on Oracle Linux 7.4, running Lua 5.1.4, OpenSSL 1.0.2k-fips, and luaossl 20181102-0.
I installed luaossl with LuaRocks. Output of
luarocks list
:The source code is located at
/usr/share/lua/5.1
.Specifically, I am trying to require
openssl.digest
. When I run the code, I see this error:I confirmed that both openssl-devel and openssl-libs are also installed on my system.
Current
package.path
:Current
package.cpath
:Any ideas? Thanks