Cannot execute main: Exec format error status 126

Why am I seeing the following all of a sudden upon building?

sh: line 1: ./main: cannot execute binary file: Exec format error
exit status 126

Come people, no one?!?

Hey, @huzzziiii welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:


There you go:

1 Like

Unfortunately, I don’t use C++, so I don’t know what the issue is, perhaps someone else can help you.

I do know that status 126 is a command not found error, so perhaps compiling is failing.

1 Like

The issue has to do with build configs in repl and not the code

1 Like

Again, I do not use C++, I just know that 126 usually means command not found, so I suspect the build/compile is failing, resulting in no file to run (Which leads to 126).

1 Like

which command are we referring to that’s not found? You mention you don’t know C++ but does this issue really require expertise in C++? I don’t think so

When it tries to run the complied program I think, though I’m not entirely sure.

I don’t use basically any compiled language normally. I will occasionally do Java, but I don’t do compiled besides that, so I don’t know where to start looking for issues here.

No one responded to this thread and it’s been 5 days already. Do I have any hope?