request help: 没有安装cjson,但仍要求删除cjson
Issue description
huangdayu@SK-20191227AUWA:~/apache-apisix-1.5$ make deps
luarocks install rockspec/apisix-master-0.rockspec --tree=deps --only-deps --local
Stopping after installing dependencies for apisix master-0
huangdayu@SK-20191227AUWA:~/apache-apisix-1.5$ ./bin/apisix version
please remove the cjson library in Lua, it may conflict with the cjson library in openresty.
luarocks remove cjson
huangdayu@SK-20191227AUWA:~/apache-apisix-1.5$ sudo luarocks remove cjson
Error: Could not find rock 'cjson' in /usr/local
huangdayu@SK-20191227AUWA:~/apache-apisix-1.5$
Environment
- apisix version (cmd:
apisix version): 1.5 - OS:
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Try lua -e "require 'cjson'"?
And lua -e "require('table.new')". Please show us your output.
huangdayu@SK-20191227AUWA:~/apache-apisix-1.5$ lua -e "require 'cjson'"
huangdayu@SK-20191227AUWA:~/apache-apisix-1.5$ lua -e "require('table.new')"
lua: (command line):1: module 'table.new' not found:
no field package.preload['table.new']
no file './table/new.lua'
no file '/usr/local/share/lua/5.1/table/new.lua'
no file '/usr/local/share/lua/5.1/table/new/init.lua'
no file '/usr/local/lib/lua/5.1/table/new.lua'
no file '/usr/local/lib/lua/5.1/table/new/init.lua'
no file '/usr/share/lua/5.1/table/new.lua'
no file '/usr/share/lua/5.1/table/new/init.lua'
no file './table/new.so'
no file '/usr/local/lib/lua/5.1/table/new.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/table/new.so'
no file '/usr/lib/lua/5.1/table/new.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './table.so'
no file '/usr/local/lib/lua/5.1/table.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/table.so'
no file '/usr/lib/lua/5.1/table.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
(command line):1: in main chunk
[C]: ?
@spacewander
Look like you has cjson installed on your machine but it is not installed via luarocks.
Maybe you can find cjson.so under your package.cpath.
@spacewander 感谢,虽然我还没解决,但是我换CentOS了,CentOS就没问题。
Look like you has cjson installed on your machine but it is not installed via luarocks. Maybe you can find cjson.so under your
package.cpath.
issues/2431 可以解答一下这个问题吗?非常感谢。
lhuangdayu@SK-20191227AUWA:~/apache-apisix-1.5$ lua -e "require 'cjson'"
@HuangDayu
it seems that you installed cjson library for standard Lua land.
If there is no more information to provide, I think this issue can be closed. Do you agree? @HuangDayu @membphis