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

反复装了N遍,还是报这个错:/usr/local/bin/orange:38: module 'bin.main' not found: #412

Open
webangeld opened this issue Mar 29, 2020 · 8 comments

Comments

@webangeld
Copy link

ERROR: /usr/local/bin/orange:38: module 'bin.main' not found:
no field package.preload['bin.main']
no file '/usr/local/orange/deps/share/lua/5.1/orange/bin/main.lua'
no file '/usr/local/orange/deps/share/lua/5.1/bin/main.lua'
no file '/usr/local/openresty/site/lualib/bin/main.ljbc'
no file '/usr/local/openresty/site/lualib/bin/main/init.ljbc'
no file '/usr/local/openresty/lualib/bin/main.ljbc'
no file '/usr/local/openresty/lualib/bin/main/init.ljbc'
no file '/usr/local/openresty/site/lualib/bin/main.lua'
no file '/usr/local/openresty/site/lualib/bin/main/init.lua'
no file '/usr/local/openresty/lualib/bin/main.lua'
no file '/usr/local/openresty/lualib/bin/main/init.lua'
no file './bin/main.lua'
no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/bin/main.lua'
no file '/usr/local/share/lua/5.1/bin/main.lua'
no file '/usr/local/share/lua/5.1/bin/main/init.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/bin/main.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/bin/main/init.lua'
no file '/usr/local/openresty/site/lualib/bin/main.so'
no file '/usr/local/openresty/lualib/bin/main.so'
no file './bin/main.so'
no file '/usr/local/lib/lua/5.1/bin/main.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/bin/main.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/usr/local/openresty/site/lualib/bin.so'
no file '/usr/local/openresty/lualib/bin.so'
no file './bin.so'
no file '/usr/local/lib/lua/5.1/bin.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/bin.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
/usr/local/bin/orange:38: in function 'file_gen'
init_worker_by_lua:46: in function <init_worker_by_lua:44>
[C]: in function 'xpcall'
init_worker_by_lua:53: in function <init_worker_by_lua:51>

@wannianma
Copy link

查看一下 /usr/local/orange/deps/share/lua/5.1/orange/bin/这个目录,是否lua的版本为5.3。具体什么原因导致的也不清楚,可能是因为安装时lua版本检测出了问题。

@wuyish
Copy link

wuyish commented May 3, 2020

我在ubuntu 18.04上也是这个错误。官方教程都是在centos上的,不知道是不是跟系统种类有关系。

@wuyish
Copy link

wuyish commented May 3, 2020

查看一下install.sh
里面有:luarocks --version
我系统没有安装luarocks 。apt-get install luarocks后,报错信息变成下面了:
Missing dependencies for orange 0.8-1:
luacrypto == 0.3.2-2 (not installed)
luasocket == 3.0rc1-2 (not installed)
lua-resty-http == 0.13-0 (not installed)
lua-resty-kafka == 0.06-0 (not installed)
lua-resty-dns-client == 1.0.0-1 (not installed)
lua-resty-jwt == 0.2.0-0 (not installed)
lua-resty-consul == 0.2-0 (not installed)

@wuyish
Copy link

wuyish commented May 3, 2020

orange 0.8-1 depends on luacrypto == 0.3.2-2 (not installed)
Installing https://luarocks.org/luacrypto-0.3.2-2.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/lcrypto.c -o src/lcrypto.o -I/usr/include
src/lcrypto.c: In function ‘digest_pnew’:
src/lcrypto.c:81:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX {aka struct evp_md_ctx_st}’
EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
^~~~~~~~~~
src/lcrypto.c: In function ‘digest_reset’:
src/lcrypto.c:120:10: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’; did you mean ‘EVP_MD_CTX_create’? [-Wimplicit-function-declaration]
if (!EVP_MD_CTX_cleanup(c))
^~~~~~~~~~~~~~~~~~
EVP_MD_CTX_create
src/lcrypto.c: In function ‘encrypt_pnew’:
src/lcrypto.c:331:69: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
EVP_CIPHER_CTX *c = (EVP_CIPHER_CTX *)lua_newuserdata(L, sizeof(EVP_CIPHER_CTX));
^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘encrypt_fencrypt’:
src/lcrypto.c:425:20: error: storage size of ‘c’ isn’t known
EVP_CIPHER_CTX c;
^

@wuyish
Copy link

wuyish commented May 3, 2020

其实就是luarocks install安装这些缺失的环境时失败了。
luarocks install luacrypto

@wuyish
Copy link

wuyish commented May 3, 2020

看起来是openssl的evp.h不再export结构EVP_MD_CTX有关。

@ruicky
Copy link

ruicky commented May 6, 2020

如果使用 make install 安装 会缺少很多 lua的依赖性,尽量用他说明的 luarocks install orange 进行安装。
也可使用 docker 进行安装, docker pull ruicky/orange

@wujunze
Copy link
Collaborator

wujunze commented May 6, 2020

请按照 README 文档的命令和步骤安装 通过 CI 测试的 慢慢来 肯定可以安装成功的

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

5 participants