You are not logged in.

#1 2010-04-04 17:20:57

error17
Member
Registered: 2010-04-02
Posts: 11

Unable to execute a binary file

I'm trying to run a server following the official instructions (http://www.ventrilo.com/setup.php#Server_Installing), but when I try to execute the binary i get this:

[srv@srv ventsrv]$ ./ventrilo_srv
bash: ./ventrilo_srv: No such file or directory
[srv@srv ventsrv]$

The permissions seem to be in order

[srv@srv ventsrv]$ ls -al
total 596
drwxr-xr-x 2 srv users     40 Nov 19  2008 .
drwx------ 3 srv users   4096 Apr  4 17:54 ..
-rw-r--r-- 1 srv users  14388 Nov 12  2007 LICENSE
-rwxr-x--x 1 srv users 468420 Nov 19  2008 ventrilo_srv
-rw-r--r-- 1 srv users  47244 Nov 12  2007 ventrilo_srv.htm
-rw-r----- 1 srv users    312 Nov 12  2007 ventrilo_srv.ini
-rwxr-x--- 1 srv users  55032 Nov 19  2008 ventrilo_status
[srv@srv ventsrv]$

I also tried using ". ventrilo_srv" instead, where I get:

[srv@srv ventsrv]$ . ventrilo_srv
bash: .: ventrilo_srv: cannot execute binary file
[srv@srv ventsrv]$

What's wrong?

Offline

#2 2010-04-04 17:39:16

Coacher
Guest

Re: Unable to execute a binary file

show output of

file ./ventrilo_srv

#3 2010-04-04 17:46:20

error17
Member
Registered: 2010-04-02
Posts: 11

Re: Unable to execute a binary file

[srv@srv ventsrv]$ file ./ventrilo_srv
./ventrilo_srv: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
[srv@srv ventsrv]$

My x86 system should be able to run 32bit, right?

Offline

#4 2010-04-04 18:57:36

Coacher
Guest

Re: Unable to execute a binary file

yes. well, you cant run binaries at all, or just that one?

#5 2010-04-04 19:20:49

error17
Member
Registered: 2010-04-02
Posts: 11

Re: Unable to execute a binary file

I went to /usr/bin and ran something without any arguments just to see if it works, and I think it did.

[root@srv bin]# file wget
wget: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
[root@srv bin]# ./wget
wget: missing URL
Usage: wget [OPTION]... [url]...

Try âwget --helpâ for more options.
[root@srv bin]# . wget
bash: .: /usr/bin/wget: cannot execute binary file
[root@srv bin]# .wget
bash: .wget: command not found
[root@srv bin]#

I'm new to linux, so what is the dot anyways? does . tell the system to run a binary file? Is "." and "./" two different things? when I do ". <filename>" it seems to always return that it cannot execute.

And when I try running my ventrilo_srv binary with ./ it says that the file doesn't exist, even though it's there.

Last edited by error17 (2010-04-04 19:21:15)

Offline

#6 2010-04-04 19:39:05

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Unable to execute a binary file

Running ./<some executable> is the proper way to run an executable file in the current directory.

Your problem is that you're trying to run a 32 bit binary on a 64 bit system without having the supporting 32 bit libraries installed. Looking at the ventrillo-server package in AUR, you need to have at least lib32-glibc to run this program:

http://aur.archlinux.org/packages.php?ID=28889

Offline

#7 2010-04-04 19:43:31

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: Unable to execute a binary file

The ./ means that foo is in the current directory. The . at the beginning of a file is use to make a "hidden" file (mostly for configurtation files).

So running ./wget worked. You just received a message that wget needs additional arguments. The other command were just wrong. In terminal you also can do wget [OPTION]... [url]...

\edit: way too slow

Last edited by Barghest (2010-04-04 19:44:27)

Offline

#8 2010-04-04 20:02:02

error17
Member
Registered: 2010-04-02
Posts: 11

Re: Unable to execute a binary file

Alright, thanks for the help all.


If ". <executable>" is wrong though, why did it say "cannot execute" and not just "command not found" as it usually does when one tries to use a non existent command?

Offline

#9 2010-04-04 20:11:36

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Unable to execute a binary file

error17 wrote:

Alright, thanks for the help all.


If ". <executable>" is wrong though, why did it say "cannot execute" and not just "command not found" as it usually does when one tries to use a non existent command?

Just type . in a terminal (assuming that bash is the current shell). You'll get an error that reads "bash: .: filename argument required". If you type ".  wget", then it's seen as you trying to pass an argument or command, in this case an error message, before wget.

Offline

#10 2010-04-05 18:15:31

Coacher
Guest

Re: Unable to execute a binary file

error17 wrote:

Alright, thanks for the help all.


If ". <executable>" is wrong though, why did it say "cannot execute" and not just "command not found" as it usually does when one tries to use a non existent command?

.

is builtin bash command. Here is copypaste from man bash:
. filename [arguments]
source filename [arguments]
Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename. If filename does not contain a slash, file names in PATH are used to find the directory containing filename. The file searched for in PATH need not be executable. When bash is not in posix mode, the current directory is searched if no file is found in PATH. If the sourcepath option to the shopt builtin command is turned off, the PATH is not searched. If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read.

Board footer

Powered by FluxBB