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

luarocks not working [Bug]: #8780

Closed
rtm562 opened this issue Jan 27, 2022 · 2 comments
Closed

luarocks not working [Bug]: #8780

rtm562 opened this issue Jan 27, 2022 · 2 comments
Labels
bug report Something is not working properly

Comments

@rtm562
Copy link

rtm562 commented Jan 27, 2022

Problem description

luarocks not working
Doesn't work with lua53 and lua54
/data/data/com.termux/files/usr/bin/lua: ...rmux/files/usr/share/lua/5.3/luarocks/core/sysdetect.lua:172: attempt to index a nil value stack traceback: ...rmux/files/usr/share/lua/5.3/luarocks/core/sysdetect.lua:172: in upvalue 'detect_elf_system' ...rmux/files/usr/share/lua/5.3/luarocks/core/sysdetect.lua:248: in function <...rmux/files/usr/share/lua/5.3/luarocks/core/sysdetect.lua:242> (...tail calls...) ...rmux/files/usr/share/lua/5.3/luarocks/core/sysdetect.lua:407: in function 'luarocks.core.sysdetect.detect' ...com.termux/files/usr/share/lua/5.3/luarocks/core/cfg.lua:600: in function 'luarocks.core.cfg.init' ...a/com.termux/files/usr/share/lua/5.3/luarocks/loader.lua:19: in main chunk [C]: in function 'require' /data/data/com.termux/files/usr/bin/luarocks:8: in main chunk [C]: in ?

What steps will reproduce the bug?

run luarocks

What is the expected behavior?

No response

System information

termux-info:

Application version:
0.118.0
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://termux.librehat.com/apt/termux-main/ stable main
Updatable packages:
termux-tools/stable 0.159 all [upgradable from: 0.158]
Android version:
7.1.2
Kernel build information:
Linux localhost 3.4.67 #1 SMP PREEMPT Sat Sep 20 15:43:00 CST 2014 armv7l Android
Device manufacturer:
LENOVO
Device model:
Lenovo A3500-H

@rtm562 rtm562 added the bug report Something is not working properly label Jan 27, 2022
@ramonrwx
Copy link

ramonrwx commented Jan 29, 2022

I had this same problem and fixed it by changing the line 248 of the sysdetect.lua

cd /data/data/com.termux/files/usr/share/lua/5.3/luarocks/core
vim sysdetect.lua

on the line 248 change:

File: sysdetect.lua
──────────────────────────────────────────
 248local system = detect_elf_system(fd, hdr, sections)

to:

File: sysdetect.lua
──────────────────────────────────────────
 248local system = "linux"

Screenshot_20220129-083308_Termux

@rtm562
Copy link
Author

rtm562 commented Jan 30, 2022

Thank you very much friend, everything is working.

@rtm562 rtm562 closed this as completed Jan 30, 2022
Grimler91 added a commit that referenced this issue Jan 30, 2022
Can't read /proc on android.

Fixes #8780, fix
found by @ramonrwx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly
Projects
None yet
Development

No branches or pull requests

2 participants