lunarmodules / luasocket

Network support for the Lua language
http://lunarmodules.github.io/luasocket/
MIT License
1.85k stars 629 forks source link

Unexpected symbol near 'char(127) #437

Closed miniCoded closed 1 month ago

miniCoded commented 1 month ago

While learning how to build containers and trying to install Lapis, I found myself stuck with this:

image

And what's weird is that lapi used to work (except lapi server).

If you want to know what my Docker file looks like, here it is (apologize if it looks noobby or whatever)

image

If I remember correctly, I also found this error many times before when trying to install it and I don't know why. I'm cursed, it never works on my machine.

miniCoded commented 1 month ago

I was trying to see if the other modules had problems, and they also have the same problems with *.so files. Did I messed something?

alerque commented 1 month ago

You've done something strange but I don't see exactly what. The shell scripting in that docker file is pretty convoluted and unnecessary (e.g. don't curl && tar && rm, just curl | tar). Also it's really strange to install both Lua 5,1 and openresty, and also you should install the Lua version you are going to use (openresty?) first not after luarocks, and then make sure when you run luarocks you specify what lua interpreter to use so everything gets match up.

Give it a tinker and if you still can't get it try aggressively simplifying (eliminate things like try not using openresty, etc.) until you find just the lowest common denominator that is actually failing. Then if you still can't get it post the docker file here as source code (not an image). You can do this in a comment with markdown code wrappers:

```dockerfile
FROM debian:latest
# rest of Dockerfile code