Cannot run an executable in current directory even using ./
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Cannot run an executable in current directory even using ./
Hi all,
Having downloaded an Astronomy program from the Internet, unTARed the content and run the install script, I now apparently have all executables and files in place where they should be.
However, if I then navigate to the directory holding the executable and ls -l, I can see it listed showing that it can be executed by all. If I then type the executable name (xplns), I get a directory/file does not exist type message. If I type ./xplns I still get the same error !
Can anyone explain to me what I am doing wrong ? I am running SuSE Linux 7.3.
I've checked that the file is executable uning ls -l, and thats OK, I've double-checked that the file name typed in is in the same case as the file listed.
However I have not checked to see if the directory itself is executable. I'll ls -ld ./ and see what is returned.
I've seen zsh throw up file not found errors when in reality it can't execute the binary.
Wow I hope you've made sure the zsh creators know that? Sounds almost too Windows to me - error messages that are not telling anything about the actual problem..
I had another look at the vendors FAQ page regarding the product installation. The ELF executable was apparently created for Slackware 3.x Linux, (tar.gz files) so maybe I downloaded and installed the wrong set of files. Alernative downloadables are as follows :
Red Hat (glibc 2.1/2.2/2.3 - .rpm files) or FreeBSD (FreeBSD i386 ELF - .tgz files)
I then read that SuSE 7.3 uses glibc 2.2. The vendor recommends checking which glibc version to download by issuing command ls /lib/libc-* however, this resulted in no matching files. So now I am not sure whether SuSE uses glibc or not.
I didn't know that program install packages were so distribution dependant.
Should I remove the current installation and try the glibc 2.2 version anyway, or is there another way of confirming which sets of files I should download ?
Most other sites I have found via Google by searching on xplns, point back to this download site, again giving you the choice of glib2.1, glib2.2, glib2.3 or libc5.
Could you point me to some of the locations of binaries you mention ?
Having mamaged to confirm SuSE 7.3 uses the glibc2.2 (soname - libc.so.6) libraries, I uninstalled the existing version of xplns (libc5), and downloaded and installed the glibc2.2 rpm files.
Now upon typing just xplns at the console, the application starts up fine and works flawlessly.
So, cs-cam, your suspicions were confirmed, i.e. the file not found error was just reflecting the wrong version for my linux installation.
Quote:
I've seen zsh throw up file not found errors when in reality it can't execute the binary.
Wow I hope you've made sure the zsh creators know that? Sounds almost too Windows to me - error messages that are not telling anything about the actual problem..
It has nothing to do with zsh, that is the error message is returned by the kernel (often because some shared lib can't be found, as seems to have been the case here).
You can confirm this easily; copy, say, /bin/bash to /tmp/foo/bash, then (as root) cd /tmp/foo and strace chroot . ./bash. I get:
Code:
...
execve("./bash", ["./bash"], [/* 122 vars */]) = -1 ENOENT (No such file or directory)
...
P.S. In these situations, the first tools I'd use are ldd and strace. For most simple cases, these will show what the problem is.
Last edited by soggycornflake; 08-12-2006 at 12:38 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.