I'm a bit surprised that you had to 'set it to executable' -- my gcc always sets the executable flag itself. This suggests to me that gcc didn't expect this to be the final executable file, or that it didn't expect it to be executable on this system. But my error message is a bit different:. What I am saying is: I suspect it has something to do with the way you compile and link your code.
Maybe you can shed some light on how you do that? The only way that works for me extracted from here :. Use file 1 to determine.
If it is not a typo, as pointed out earlier, it could be wrong compiler options like compiling 64 bit under 32 bit. It must not be a toolchain. Or use directive ". I hope it helps. Sorry, for my english language. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to run binary file in Linux Ask Question. Asked 9 years, 10 months ago. Active 1 year, 5 months ago.
Viewed k times. Improve this question. Mateusz Piotrowski 6, 9 9 gold badges 46 46 silver badges 74 74 bronze badges. Sijith Sijith 3, 14 14 gold badges 55 55 silver badges 90 90 bronze badges. In addition of using file , I also suggest using ldd ; perhaps the dynamic linker or some core shared library is different or missing Sorry for wrong file name I still have a lot to learn about linux, but I surmise this problem is a result of Hudson not connecting with a console.
I don't know exactly what Hudson does to control its slave. Can anyone explain to me what is happening and how I can fix it? I cannot remove any of the servers from this equation. It may be possible to take minicom out of the equation but that would add an unknown amount of time to this project, so I'd much prefer a solution that uses what I already have.
The message cannot execute binary file has nothing to do with terminals I wonder what led you to think that — and I recommend avoiding making such assumptions in a question, as they tend to drown your actual problem in a mess of red herrings. First, make sure you didn't accidentally try to run this executable as a script. If you wrote.
That can't be done if the file is not a script. Otherwise, this message means that. I don't have any definite guess as to what is happening though. If you can run the script on that same machine by invoking it in a different way, it can't just be a corrupt file or a file for the wrong architecture it might be that, but there's more to it.
Vincent Gerris Vincent Gerris 5, 1 1 gold badge 17 17 silver badges 18 18 bronze badges. To anyone else having the problem i had. Whatever you are hoping to accomplish, chmod is wrong and dangerous. You absolutely do not want to grant write access to executable or system files to all users under any circumstances.
You will want to revert to sane permissions ASAP for your use case, probably chmod and learn about the Unix permissions model before you try to use it again.
If this happened on a system with Internet access, check whether an intruder could have exploited this to escalate their privileges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.
Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Hot Network Questions.
Question feed. Stack Overflow works best with JavaScript enabled.
0コメント