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

bug: lua: /usr/bin/apisix:535: module 'apisix.core.profile' not found: #1449

Closed
cyxinda opened this issue Apr 14, 2020 · 5 comments
Closed

Comments

@cyxinda
Copy link
Contributor

cyxinda commented Apr 14, 2020

Issue description

When I install the apisix of the version 1.2 or the version master,the bug 'lua: /usr/bin/apisix:535: module 'apisix.core.profile' not found:' happens.

Environment

  • My lua version is :
    [root@v175 incubator-apisix-master]# lua -v Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
  • apisix version (cmd: apisix version):
    1.2 or master
  • OS:centos 7.5

Minimal test code / Steps to reproduce the issue

1.First I run the command 'make deps' in the $APISIX_ROOT.
2.Then I run the commond 'make install' to copy the directory of logs and conf to the directory of '/usr/local/apisix/'.
3.I copy the directory of deps and dashboard to the directory of /usr/local/apisix/.
4.Finally ,I run the command 'apisix start',And the bug happens.

What's the actual result? (including assertion message & call stack if applicable)

[root@v175 apisix]# apisix start
lua: /usr/bin/apisix:535: module 'apisix.core.profile' not found:
no field package.preload['apisix.core.profile']
no file '/usr/local/apisix/deps/share/lua/5.1/apisix/core/profile.lua'
no file '/usr/local/share/lua/5.3/apisix/core/profile.lua'
no file '/usr/local/share/lua/5.3/apisix/core/profile/init.lua'
no file '/usr/local/lib/lua/5.3/apisix/core/profile.lua'
no file '/usr/local/lib/lua/5.3/apisix/core/profile/init.lua'
no file './apisix/core/profile.lua'
no file './apisix/core/profile/init.lua'
no file '/usr/local/apisix/deps/lib64/lua/5.1/apisix/core/profile.so'
no file '/usr/local/apisix/deps/lib/lua/5.1/apisix/core/profile.so'
no file '/usr/local/lib/lua/5.3/apisix/core/profile.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './apisix/core/profile.so'
no file '/usr/local/apisix/deps/lib64/lua/5.1/apisix.so'
no file '/usr/local/apisix/deps/lib/lua/5.1/apisix.so'
no file '/usr/local/lib/lua/5.3/apisix.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './apisix.so'
stack traceback:
[C]: in function 'require'
/usr/bin/apisix:535: in upvalue 'read_yaml_conf'
/usr/bin/apisix:644: in upvalue 'init'
/usr/bin/apisix:809: in field '?'
/usr/bin/apisix:854: in main chunk
[C]: in ?

What's the expected result?

no message occur,and the process of apisix running .

@membphis
Copy link
Member

the 2 step is wrong.

The Apache APISIX can not be installed by this way. make install is a wrong way.

If you want to install APISIX to your local machine, you need to install it by luarocks.

1.First I run the command 'make deps' in the $APISIX_ROOT.
2.Then I run the commond 'make install' to copy the directory of logs and conf to the directory of '/usr/local/apisix/'.

@moonming
Copy link
Member

@membphis I think we can change the name of make install

@cyxinda
Copy link
Contributor Author

cyxinda commented Apr 15, 2020

the 2 step is wrong.

The Apache APISIX can not be installed by this way. make install is a wrong way.

If you want to install APISIX to your local machine, you need to install it by luarocks.

1.First I run the command 'make deps' in the $APISIX_ROOT.
2.Then I run the commond 'make install' to copy the directory of logs and conf to the directory of '/usr/local/apisix/'.

There are three ways to install apisix at least in the guidance document,include 'source code','luarocks',' yum' and so on. Why the way of source code is wrong ? And the way by yum is also wrong .
[root@v175 install]# yum install -y https://github.com/apache/incubator-apisix/releases/download/1.2/apisix-1.2-0.el7.noarch.rpm Loaded plugins: fastestmirror Cannot open: https://github.com/apache/incubator-apisix/releases/download/1.2/apisix-1.2-0.el7.noarch.rpm. Skipping. Error: Nothing to do

@membphis
Copy link
Member

@membphis I think we can change the name of make install

Determine whether it is loaded by Luarocks.

If no Luarocks environment variable is found, we can display some warning messages.

@cyxinda
Copy link
Contributor Author

cyxinda commented Apr 15, 2020

After I reinstalled all the independencies of the software ,the apisix of version1.2 has been installed successfully.
呜呜呜..........

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

3 participants