Git Product home page Git Product logo

Comments (4)

fffonion avatar fffonion commented on August 29, 2024

Hi @masaya-kato63 , the LUA_PATH on your setup is not matching the path make install writes to.
try with
make install LUA_LIB_DIR=/opt/nginx/lib/lua/

from lua-resty-openssl.

masaya-kato63 avatar masaya-kato63 commented on August 29, 2024

@fffonion
thank you for your reply.
When I tried it, I got the following situation.

# ls /opt/nginx/lib/lua/resty/
core  core.lua  lrucache  lrucache.lua  openssl  openssl.lua
# ls -R /opt/nginx/lib/lua/resty/openssl
/opt/nginx/lib/lua/resty/openssl:
asn1.lua   bn.lua      ctx.lua  digest.lua  ecx.lua  hmac.lua  kdf.lua  objects.lua  pkcs12.lua  provider.lua  rsa.lua      ssl.lua    version.lua
auxiliary  cipher.lua  dh.lua   ec.lua      err.lua  include   mac.lua  param.lua    pkey.lua    rand.lua      ssl_ctx.lua  stack.lua  x509

/opt/nginx/lib/lua/resty/openssl/auxiliary:
bio.lua  ctypes.lua  ecdsa.lua  jwk.lua  nginx_c.lua  nginx.lua

/opt/nginx/lib/lua/resty/openssl/include:
asn1.lua  bn.lua    crypto.lua  ecdsa.lua  err.lua  evp.lua   objects.lua   param.lua  pkcs12.lua    rand.lua  ssl.lua    x509        x509_vfy.lua
bio.lua   conf.lua  dh.lua      ec.lua     evp      hmac.lua  ossl_typ.lua  pem.lua    provider.lua  rsa.lua   stack.lua  x509v3.lua

/opt/nginx/lib/lua/resty/openssl/include/evp:
cipher.lua  kdf.lua  mac.lua  md.lua  pkey.lua

/opt/nginx/lib/lua/resty/openssl/include/x509:
altname.lua  crl.lua  csr.lua  extension.lua  init.lua  name.lua  revoked.lua

/opt/nginx/lib/lua/resty/openssl/x509:
altname.lua  chain.lua  crl.lua  csr.lua  extension  extension.lua  extensions.lua  init.lua  name.lua  revoked.lua  store.lua

/opt/nginx/lib/lua/resty/openssl/x509/extension:
dist_points.lua  info_access.lua

HTTP request after restarting Nginx.

2023/12/27 02:12:26 [error] 15164#0: *4988 lua entry thread aborted: runtime error: /opt/cert/mtls.lua:1: module 'resty.openssl.x509' not found:
	no field package.preload['resty.openssl.x509']
	no file '/opt/nginx/lib/lua/resty/openssl/x509.lua'
	no file './resty/openssl/x509.lua'
	no file '/usr/local/share/luajit-2.1/resty/openssl/x509.lua'
	no file '/usr/local/share/lua/5.1/resty/openssl/x509.lua'
	no file '/usr/local/share/lua/5.1/resty/openssl/x509/init.lua'
	no file './resty/openssl/x509.so'
	no file '/usr/local/lib/lua/5.1/resty/openssl/x509.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './resty.so'
	no file '/usr/local/lib/lua/5.1/resty.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
coroutine 0:
	[C]: in function 'require'
	/opt/cert/mtls.lua:1: in main chunk, client: 127.0.0.1, server: localhost, request: "PUT /put HTTP/1.1", host: "localhost"

from lua-resty-openssl.

fffonion avatar fffonion commented on August 29, 2024
lua_package_path "/opt/nginx/lib/lua/?.lua;/opt/nginx/lib/lua/?/init.lua;;";

will do.

from lua-resty-openssl.

masaya-kato63 avatar masaya-kato63 commented on August 29, 2024

@fffonion
Thanks to you I was able to solve the problem!

wget https://github.com/mpx/lua-cjson/archive/refs/tags/2.1.0.tar.gz
tar -zxvf 2.1.0.tar.gz
cd lua-cjson-2.1.0
make install PREFIX=/opt/nginx
lua_package_path "/opt/nginx/lib/lua/?.lua;/opt/nginx/lib/lua/?/init.lua;;";
lua_package_cpath "/opt/nginx/lib/lua/5.1/?.so;;";

from lua-resty-openssl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.