Skip to content
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

help request: Start APISIX failed, jsonschema.lua:54: depends on lrexlib-pcre, please install it first: error loading module 'rex_pcre' from file '/opt/cloud/gateway/apisix/apisix/deps/lib/lua/5.1/rex_pcre.so': #12016

Open
cnz101 opened this issue Mar 4, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@cnz101
Copy link

cnz101 commented Mar 4, 2025

Description

I have installed apisix using source code, but when i start apisix, the error log is :
Error log

...
/opt/cloud/gateway/apisix/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua start
/opt/cloud/gateway/apisix/openresty//luajit/bin/luajit: .../gateway/apisix/apisix/deps/share/lua/5.1/jsonschema.lua:54: depends on lrexlib-pcre, please install it first: error loading module 'rex_pcre' from file '/opt/cloud/gateway/apisix/apisix/deps/lib/lua/5.1/rex_pcre.so':
	/opt/cloud/gateway/apisix/apisix/deps/lib/lua/5.1/rex_pcre.so: undefined symbol: pcre_free
stack traceback:
	[C]: in function 'error'
	.../gateway/apisix/apisix/deps/share/lua/5.1/jsonschema.lua:54: in function 'custom_match_pattern'
	[string "jsonschema:anonymous"]:318: in function 'var_0_21'
	[string "jsonschema:anonymous"]:336: in function 'var_0_20'
	[string "jsonschema:anonymous"]:449: in function 'var_0_18'
	[string "jsonschema:anonymous"]:1493: in function 'validator'
	...y/apisix/apisix/deps/share/lua/5.1/apisix/cli/schema.lua:420: in function 'validate'
	...eway/apisix/apisix/deps/share/lua/5.1/apisix/cli/ops.lua:178: in function 'init'
	...eway/apisix/apisix/deps/share/lua/5.1/apisix/cli/ops.lua:903: in function <...eway/apisix/apisix/deps/share/lua/5.1/apisix/cli/ops.lua:810>
	...eway/apisix/apisix/deps/share/lua/5.1/apisix/cli/ops.lua:1020: in function 'execute'
	./apisix/cli/apisix.lua:40: in main chunk
	[C]: at 0x5572d5f096d0

I have install lrexlib-pcre

Image

Image

Environment

  • APISIX version (run apisix version): 3.9.1
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):3.8

Anybody who can help me? very appreciate for your help. @juzhiyuan

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Apache APISIX backlog Mar 4, 2025
@dosubot dosubot bot added the bug Something isn't working label Mar 4, 2025
@cnz101
Copy link
Author

cnz101 commented Mar 4, 2025

And when i execute lua -lrex_pcre, the error log is:

[root@localhost 5.1]# ll
total 10584
-rwx------ 1 gateway servicetools   14600 Mar  4 12:03 bit32.so
-rwx------ 1 gateway servicetools   23056 Mar  4 12:03 lfs.so
-rwx------ 1 gateway servicetools 4553072 Mar  4 12:03 libcrypto.so
-rwx------ 1 gateway servicetools   14520 Mar  4 12:03 librestychash.so
-rwx------ 1 gateway servicetools  112768 Mar  4 12:03 librestyradixtree.so
-rwx------ 1 gateway servicetools  779752 Mar  4 12:03 libssl.so
-rwx------ 1 gateway servicetools   56032 Mar  4 12:03 lpeg.so
-rwx------ 1 gateway servicetools   21288 Mar  4 12:03 lua_pack.so
drwx------ 2 gateway servicetools    4096 Mar  4 12:03 mime
-rwx------ 1 gateway servicetools   17456 Mar  4 12:03 nanoid.so
-rwx------ 1 gateway servicetools   89248 Mar  4 12:03 pb.so
drwx------ 3 gateway servicetools    4096 Mar  4 12:03 posix
-rwx------ 1 gateway servicetools   14600 Mar  4 12:03 random.so
-rwx------ 1 gateway servicetools   44896 Mar  4 12:03 rex_pcre.so
-rwx------ 1 gateway servicetools   14608 Mar  4 12:03 snowflake.so
drwx------ 2 gateway servicetools    4096 Mar  4 12:03 socket
-rwx------ 1 gateway servicetools 5042288 Mar  4 12:03 ssl.so
[root@localhost 5.1]# lua -lrex_pcre
lua: error loading module 'rex_pcre' from file './rex_pcre.so':
	libpcre.so.1: cannot open shared object file: No such file or directory
stack traceback:
	[C]: in ?
	[C]: in function 'require'
	[C]: in ?
[root@localhost 5.1]# 

@cnz101 cnz101 changed the title help request: Start APISIX failed, Failed to validate config: property "apisix" validation failed help request: Start APISIX failed, jsonschema.lua:54: depends on lrexlib-pcre, please install it first: error loading module 'rex_pcre' from file '/opt/cloud/gateway/apisix/apisix/deps/lib/lua/5.1/rex_pcre.so': Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant