Page 1 of 1

Issues w/ running .exe

Posted: Mon Jul 01, 2013 11:42 pm
by YourMajesty
I'm wondering why I haven't been able to run any .exes on my pi, even through LXTerminal. Lately, I've been trying to run minecraft-pi.exe, but LXTerminal won't recognise it. I have followed the site and the .txt's instructions, but neither work.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 2:52 am
by Joe Schmoe
There's no such thing as an ".exe" in Linux.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 3:33 am
by YourMajesty
Sorry, I meant that I cant run executables

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 5:02 am
by cdduvall
The pi doesn't run off windows, therefore you can't run those types of files. Its a totally different operating system, so it has totally different application files. Your problem is similar to trying to run that same file on your android smartphone...it's just not going to work.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 5:12 am
by YourMajesty
The youtube tutorials and online instructions all say that it works through LXTerminal. They cd then use ./nameofexecutable on the next line, and it works. However, my pi sends a "no such file or directory" error.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 5:47 am
by Hove
The ./ before nameofexecutable means you need to be in the same directory as nameofexecutable when you type ./nameofexecutable. Or put it the other way round, nameofexecutable need to be in the same directory as where you type ./nameofexecutable. ./ means the current directory.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 5:59 am
by YourMajesty
if you are saying that I need to change the directory (cd) over to where the file is located in order to run it, then I've already done that.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 6:38 am
by rpdom
What messages do you get (if any) when you try to run a program?

What permissions are set on the file? (use "ls -l minecruft-pi" to check.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 6:47 am
by YourMajesty
I tried it and it says:
-rwxr-xr-x 1 pi pi 1206760 Feb 11 2013 minecraft-pi

I have absolutely no idea what that means

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 6:53 am
by jackokring

Code: Select all

./minecraft-pi
Perhaps ... check spelling, and the meaning of "name" of "executable".

The x's in the beginning of the listing (ls) long (-l) express executable for user (first pi), group (an ownership set, second pi), and everyone else. Hence 3 x's.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 7:08 am
by YourMajesty
I copied and pasted the ./minecraft-pi command directly from the HOW_TO_RUN.txt file included with the minecraft-pi package, so I know it should have worked. As for the 3 x's thing, I think I have an idea as to what you are saying.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 9:35 am
by rpdom
The -rwxr-xr-x bit is correct. That should work when you type ./minecraft-pi

What does it actually do when you type that in a terminal? Does it just go back to the $ prompt again, or give an error msg?

Another thing to try is: "file minecraft-pi". This will try to work out what sort of file it is and may give a clue why it isn't working.

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 8:12 pm
by YourMajesty
LXTerminal throws the "No such file or directory" error every time I attempt to run ./minecraft-pi. As for the "file minecraft-pi" thing, here is what is displayed in my window:

minecraft-pi: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked(uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1] = 0x7f5a7cece38092451a55d83790ab639e59e9, stripped

I don't know what it all means

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 8:50 pm
by rpdom
YourMajesty wrote:LXTerminal throws the "No such file or directory" error every time I attempt to run ./minecraft-pi.
Odd...
As for the "file minecraft-pi" thing, here is what is displayed in my window:

minecraft-pi: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked(uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1] = 0x7f5a7cece38092451a55d83790ab639e59e9, stripped

I don't know what it all means
The meaning of each bit is not too important. It shows that it is an ARM executable file, which is good. It does say that it "uses shared libs" and is "for Linux 2.6.26". I'm wondering if it is trying to find a library file that isn't on your Pi. You are probably running a later linux kernel than 2.6.26.

The message "No such file or directory" could mean that a file that the program needs isn't found, rather than the program itself.

I'm afraid I need to leave any more investigation until the morning, as I need sleep. I will look at it again then.

Could you post a link to where I can download that file from, so I might be able to try it myself when I wake up?

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 8:52 pm
by DeeJay
I've just downloaded and installed minecraft-pi onto my RPi which is running the 2013-05-25 version of wheezy-raspbian via the NOOBS installer.

All the file permissions, sizes and attributes appear to match what YourMajesty reports.

I don't get that error when I try to run it.

So, really back to basics questions -

Are you logged in as user pi ?

And not using elevated/root privileges with something like sudo?

You have a shell (command line) prompt that ends in mcpi $

And you are typing ./minecraft-pi

NOT ./minecraft-pi. ?

Because that last one DOES give this error -
pi@NOOBSv121pub ~/mcpi $ ./minecraft-pi.
-bash: ./minecraft-pi.: No such file or directory

Re: Issues w/ running .exe

Posted: Tue Jul 02, 2013 9:04 pm
by YourMajesty
I had my suspicions that it maybe couldn't find something and that was causing the error. By the way, here is the site for minecraft-pi: http://pi.minecraft.net/

Just a forewarning to any/all who try minecraft-pi: using 2 USB ports while running minecraft-pi can cause your USB ports to crash

About what you said, DeeJay:
> yes, I am logged in as pi
> I have tried with sudo, and without- both fail
> I change directories (cd) so that I am in the mcpi folder
> I type ./minecraft-pi not ./minecraft-pi. I don't include the "." at the end

I will check my version of Raspbian and see if that might be the issue

Re: Issues w/ running .exe

Posted: Wed Jul 03, 2013 12:47 am
by YourMajesty
Got it running! Turns out, my version of Raspian is one of the earlier ones. I got the newest and everything so far works perfectly. Thanks guys, for all your help!