Two files called liballeg.so.4.2 and liballeg-4.2.so both are under /usr/lib/
If I run it in a console with the command "sh myprogram"
Well of course THAT isn't going to work - it's only for shell scripts. But the error message makes me suspicous... usually it's just "Cannot execute binary file". Can you tell me what this command produces:
# cat myprogram
It might very well crash your system, so be ready to hit CTRL-C! ;)
Basically you should get a whole dump of random junk. If there's anything legible in there, something's definitely wrong.
If I run it by the console with the command "./myprogram" it returns nothing.
Do regular OpenGL applications run on your system? Perhaps you could download a program in binary form that's been created with Allegro to make sure that your runtime environment is good.