| View previous topic :: View next topic |
| Author |
Message |
donoreo LXF regular

Joined: Mon Apr 11, 2005 2:49 pm Posts: 788 Location: Toronto, Ontario, Canada
|
Posted: Wed Feb 04, 2009 1:56 pm Post subject: Cannot execute binary file - Mono program |
|
|
I am stuck on the firs project from Paul's coding academy! I am getting the error above. I cannot run the program from a command prompt. It runs fine in MonoDevelop. Permissions are fine. Googling turns up a lot of the same problem with scripts, but not much that helps me. Ideas? _________________ I cannot deny anything that I did not say. |
|
| Back to top |
|
 |
M-Saunders Moderator

Joined: Mon Apr 11, 2005 1:14 pm Posts: 2881
|
Posted: Wed Feb 04, 2009 2:07 pm Post subject: RE: Cannot execute binary file - Mono program |
|
|
Are you trying to run the program with ./progname? You might need to try mono progname.
M |
|
| Back to top |
|
 |
donoreo LXF regular

Joined: Mon Apr 11, 2005 2:49 pm Posts: 788 Location: Toronto, Ontario, Canada
|
Posted: Wed Feb 04, 2009 2:10 pm Post subject: RE: Cannot execute binary file - Mono program |
|
|
Hmmmm yes, it apparently does need that. Paul's tutorial did not mention it, just ./progname . I may just be the first person working on it with all the time I have being unemployed still Thanks. _________________ I cannot deny anything that I did not say. |
|
| Back to top |
|
 |
Hudzilla Site admin

Joined: Mon Apr 04, 2005 12:52 pm Posts: 265 Location: LXF Towers
|
Posted: Wed Feb 04, 2009 2:22 pm Post subject: RE: Cannot execute binary file - Mono program |
|
|
Hey!
Yes, you probably need to use "mono ToDoList.exe". I didn't mention it because on Ubuntu ./ToDoList.exe works fine
I'll add it.
Paul |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1549 Location: Guisborough
|
Posted: Wed Feb 04, 2009 3:58 pm Post subject: RE: Cannot execute binary file - Mono program |
|
|
./ works fine on 8.10 but I've found with 8.04 (Dell Mini 9 version) I have to use mono ?.exe
One question if I can highjack this tread, var contents = File.ReadAllText does work for me, gives an error on build. Works if I change it to string contents. This is with 8.04 as above, not had time to try it on 8.10 yet so is this a quirk of 8.04 ? _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
donoreo LXF regular

Joined: Mon Apr 11, 2005 2:49 pm Posts: 788 Location: Toronto, Ontario, Canada
|
Posted: Wed Feb 04, 2009 4:05 pm Post subject: RE: Cannot execute binary file - Mono program |
|
|
I am using Suse 11.1. _________________ I cannot deny anything that I did not say. |
|
| Back to top |
|
 |
ollie Moderator

Joined: Mon Jul 25, 2005 12:26 pm Posts: 2749 Location: Bathurst NSW Australia
|
Posted: Wed Feb 04, 2009 11:37 pm Post subject: RE: Cannot execute binary file - Mono program |
|
|
Is the location of "mono" part of your PATH variable with the correct permissions to access?
See Setting your Path. |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1549 Location: Guisborough
|
Posted: Thu Feb 05, 2009 8:29 am Post subject: RE: Cannot execute binary file - Mono program |
|
|
Cheers for that Ollie, I'll check my PATH on the Mini 9
As for the issue with var, just setup up vbox running 8:10 and no error. _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
tj-blues
Joined: Sun Apr 25, 2010 12:46 am Posts: 3 Location: Mississauga, ON, Canada
|
Posted: Sun Apr 25, 2010 1:40 am Post subject: Re: RE: Cannot execute binary file - Mono program |
|
|
| ollie wrote: | Is the location of "mono" part of your PATH variable with the correct permissions to access?
See Setting your Path. |
PATH has not much to do with it. Your post confused me for a while so I checked: and yes, mono is installed in /usr/bin directory. But, think, it got to be in PATH because it's sufficient to call "mono program" and not "./mono program".
But still the question is valid - how to make it work without need of issuing "mono" before programname?
cheers |
|
| Back to top |
|
 |
LeoP
Joined: Wed Jun 09, 2010 1:23 pm Posts: 1
|
Posted: Wed Jun 09, 2010 1:28 pm Post subject: Re: RE: Cannot execute binary file - Mono program |
|
|
| tj-blues wrote: | | But still the question is valid - how to make it work without need of issuing "mono" before programname? |
Most distros will install binfmt-support with mono, but many will chose not to enable it: Try
| Code: | | sudo update-binfmts --display |
and see, if it has an entry like "cli (disabled):". If yes, then
| Code: | | sudo update-binfmts --enable cli |
is your friend. |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1549 Location: Guisborough
|
Posted: Wed Jun 09, 2010 5:54 pm Post subject: Re: RE: Cannot execute binary file - Mono program |
|
|
| tj-blues wrote: | | ollie wrote: | Is the location of "mono" part of your PATH variable with the correct permissions to access?
See Setting your Path. |
PATH has not much to do with it. Your post confused me for a while so I checked: and yes, mono is installed in /usr/bin directory. But, think, it got to be in PATH because it's sufficient to call "mono program" and not "./mono program".
But still the question is valid - how to make it work without need of issuing "mono" before programname?
cheers |
tj, if your path is correct then you run it like ./prog.exe as you would with a sh script - no need to ref mono. _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
tj-blues
Joined: Sun Apr 25, 2010 12:46 am Posts: 3 Location: Mississauga, ON, Canada
|
Posted: Sat Jun 19, 2010 3:29 am Post subject: Re: RE: Cannot execute binary file - Mono program |
|
|
| Ram wrote: |
tj, if your path is correct then you run it like ./prog.exe as you would with a sh script - no need to ref mono. |
As I said before - correct PATH will only point system to /usr/bin directory. It doesn't give any references how the system has to deal with ".exe" file.
I run Suse 11.1 and every time I want to execute C# program I need to type "mono" first. |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1549 Location: Guisborough
|
Posted: Sat Jun 19, 2010 6:10 pm Post subject: |
|
|
Hi tj,
You confused me with ./ before mono " it's sufficient to call "mono program" and not "./mono program". "
Anyway have a read of the Registering .exe as non-native binaries (Linux only) section.
Ram _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
tj-blues
Joined: Sun Apr 25, 2010 12:46 am Posts: 3 Location: Mississauga, ON, Canada
|
Posted: Sat Jun 19, 2010 9:49 pm Post subject: |
|
|
Thanks a lot - this should help. But I think I wont use it because I run other .exe files for ex. with Wine.
cheers |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|