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

request help: 没有安装cjson,但仍要求删除cjson #2419

Closed
HuangDayu opened this issue Oct 14, 2020 · 8 comments
Closed

request help: 没有安装cjson,但仍要求删除cjson #2419

HuangDayu opened this issue Oct 14, 2020 · 8 comments

Comments

@HuangDayu
Copy link

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
@spacewander
Copy link
Member

Try lua -e "require 'cjson'"?

@spacewander
Copy link
Member

spacewander commented Oct 14, 2020

And lua -e "require('table.new')". Please show us your output.

@HuangDayu
Copy link
Author

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

@spacewander
Copy link
Member

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.

@HuangDayu
Copy link
Author

@spacewander 感谢,虽然我还没解决,但是我换CentOS了,CentOS就没问题。

@HuangDayu
Copy link
Author

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 可以解答一下这个问题吗?非常感谢。

@membphis
Copy link
Member

membphis commented Oct 15, 2020

lhuangdayu@SK-20191227AUWA:~/apache-apisix-1.5$ lua -e "require 'cjson'"

@HuangDayu

it seems that you installed cjson library for standard Lua land.

@idbeta
Copy link
Contributor

idbeta commented Nov 5, 2020

If there is no more information to provide, I think this issue can be closed. Do you agree? @HuangDayu @membphis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants