LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 02-24-2015, 02:03 AM   #1
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Rep: Reputation: 28
No such file or directory, but file exists.


Code:
free $ pwd
/opt/google/earth/free

free $ file googleearth-bin 
googleearth-bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-lsb-x86-64.so.3, for GNU/Linux 2.6.24, BuildID[sha1]=693eb30111744b4518910a316785d954c7a1b0fd, stripped

free $ uname -a
Linux HP-Gentoo 3.17.8-gentoo-r1-02-usb #2 SMP Wed Feb 11 12:39:50 AWST 2015 x86_64 Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz GenuineIntel GNU/Linux

free $ ls -al googleearth-bin 
-rwxr-xr-x 1 root root 6088 Oct  8  2013 googleearth-bin

free $ ./googleearth-bin 
bash: ./googleearth-bin: No such file or directory

free $
Why am I getting the error? It appears that the file is present and executable.

Thanks
Jim
 
Old 02-24-2015, 03:54 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,505

Rep: Reputation: Disabled
Might be it is owned by root & you are trying to run it as a user, try switching to root to run it(?).
 
Old 02-24-2015, 04:30 AM   #3
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Original Poster
Rep: Reputation: 28
Trying as root gives the same result. Besides, permissions are set for all to enter or execute for the whole path.

Last edited by CollieJim; 02-24-2015 at 04:31 AM.
 
Old 02-24-2015, 05:51 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,936

Rep: Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323
usually that means the file begins with a shebang: #!/bin/bash or something similar and that file does not exist.
Just execute: head ./googleearth-bin and you will see.
 
Old 02-24-2015, 06:41 AM   #5
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Original Poster
Rep: Reputation: 28
This is emacs' hexl display of the start of googleearth-bin:
Code:
00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000  .ELF............
00000010: 0200 3e00 0100 0000 9008 4000 0000 0000  ..>.......@.....
00000020: 4000 0000 0000 0000 0811 0000 0000 0000  @...............
00000030: 0000 0000 4000 3800 0900 4000 1b00 1a00  ....@.8...@.....
00000040: 0600 0000 0500 0000 4000 0000 0000 0000  ........@.......
00000050: 4000 4000 0000 0000 4000 4000 0000 0000  @.@.....@.@.....
00000060: f801 0000 0000 0000 f801 0000 0000 0000  ................
00000070: 0800 0000 0000 0000 0300 0000 0400 0000  ................
00000080: 3802 0000 0000 0000 3802 4000 0000 0000  8.......8.@.....
00000090: 3802 4000 0000 0000 1a00 0000 0000 0000  8.@.............
000000a0: 1a00 0000 0000 0000 0100 0000 0000 0000  ................
000000b0: 0100 0000 0500 0000 0000 0000 0000 0000  ................
000000c0: 0000 4000 0000 0000 0000 4000 0000 0000  ..@.......@.....
000000d0: 440b 0000 0000 0000 440b 0000 0000 0000  D.......D.......
000000e0: 0000 2000 0000 0000 0100 0000 0600 0000  .. .............
000000f0: e80c 0000 0000 0000 e80c 6000 0000 0000  ..........`.....
00000100: e80c 6000 0000 0000 3803 0000 0000 0000  ..`.....8.......
00000110: 4803 0000 0000 0000 0000 2000 0000 0000  H......... .....
00000120: 0200 0000 0600 0000 100d 0000 0000 0000  ................
00000130: 100d 6000 0000 0000 100d 6000 0000 0000  ..`.......`.....
00000140: d002 0000 0000 0000 d002 0000 0000 0000  ................
00000150: 0800 0000 0000 0000 0400 0000 0400 0000  ................
00000160: 5402 0000 0000 0000 5402 4000 0000 0000  T.......T.@.....
00000170: 5402 4000 0000 0000 4400 0000 0000 0000  T.@.....D.......
00000180: 4400 0000 0000 0000 0400 0000 0000 0000  D...............
00000190: 50e5 7464 0400 0000 7c0a 0000 0000 0000  P.td....|.......
000001a0: 7c0a 4000 0000 0000 7c0a 4000 0000 0000  |.@.....|.@.....
000001b0: 2c00 0000 0000 0000 2c00 0000 0000 0000  ,.......,.......
The normal way to start googleearth is with the script:
Code:
free $ ./google-earth 
./google-earth: line 44: ./googleearth-bin: No such file or directory

free $ cat ./google-earth
#!/bin/sh
#set -x
# Always run Google Earth from this shell script and not
# Google Earth directly! This script makes sure the app looks
# in the right place for libraries that might also be installed
# elsewhere on your system.
#
# Ryan C. Gordon,  Thu Jul 20 14:32:33 PDT 2006

# Function to find the real directory a program resides in.
FindPath()
{
    fullpath="`echo $1 | grep /`"
    if [ "$fullpath" = "" ]; then
        oIFS="$IFS"
        IFS=:
        for path in $PATH
        do if [ -x "$path/$1" ]; then
               if [ "$path" = "" ]; then
                   path="."
               fi
               fullpath="$path/$1"
               break
           fi
        done
        IFS="$oIFS"
    fi
    if [ "$fullpath" = "" ]; then
        fullpath="$1"
    fi

    # Is the sed/ls magic portable?
    if [ -L "$fullpath" ]; then
        #fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
        fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/\*//'`
    fi
    dirname $fullpath
}

script_path=$(FindPath $0);

cd $script_path;

LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./googleearth-bin "$@"
507 20:31:12 free $
 
Old 02-24-2015, 07:44 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,936

Rep: Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323
in that case you can try
Code:
strace -f -o /tmp/strace.log ./google-earth 
grep open /tmp/strace.log
and you will see what's happened
 
Old 02-24-2015, 09:05 AM   #7
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Original Poster
Rep: Reputation: 28
Thanks. It looks like locale has not been set up properly. I will look into it.

Code:
502 22:55:05 free $ grep open /tmp/strace.log 
15599 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
15599 open("/lib64/libreadline.so.6", O_RDONLY|O_CLOEXEC) = 3
15599 open("/lib64/libncurses.so.5", O_RDONLY|O_CLOEXEC) = 3
15599 open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
15599 open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
15599 open("/dev/tty", O_RDWR|O_NONBLOCK) = 3
15599 open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
15599 open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3
15599 open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
15599 open("./google-earth", O_RDONLY)  = 3
15603 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
15603 open("/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
15603 open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
15603 open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
15603 open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
15603 open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
15603 open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
15603 open("/usr/share/locale/en_AU.utf8/LC_MESSAGES/grep.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15603 open("/usr/share/locale/en_AU/LC_MESSAGES/grep.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15603 open("/usr/share/locale/en.utf8/LC_MESSAGES/grep.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15603 open("/usr/share/locale/en/LC_MESSAGES/grep.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15605 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC <unfinished ...>
15605 <... open resumed> )              = 3
15605 open("/lib64/libacl.so.1", O_RDONLY|O_CLOEXEC <unfinished ...>
15605 <... open resumed> )              = 3
15606 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC <unfinished ...>
15606 <... open resumed> )              = 3
15606 open("/lib64/libacl.so.1", O_RDONLY|O_CLOEXEC <unfinished ...>
15606 <... open resumed> )              = 3
15606 open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC <unfinished ...>
15606 <... open resumed> )              = 3
15606 open("/lib64/libattr.so.1", O_RDONLY|O_CLOEXEC <unfinished ...>
15606 <... open resumed> )              = 3
15605 open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC <unfinished ...>
15605 <... open resumed> )              = 3
15607 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC <unfinished ...>
15607 <... open resumed> )              = 3
15605 open("/lib64/libattr.so.1", O_RDONLY|O_CLOEXEC <unfinished ...>
15605 <... open resumed> )              = 3
15607 open("/lib64/libacl.so.1", O_RDONLY|O_CLOEXEC <unfinished ...>
15607 <... open resumed> )              = 3
15607 open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC <unfinished ...>
15607 <... open resumed> )              = 3
15606 open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC <unfinished ...>
15606 <... open resumed> )              = 3
15607 open("/lib64/libattr.so.1", O_RDONLY|O_CLOEXEC <unfinished ...>
15606 open("/usr/lib64/charset.alias", O_RDONLY <unfinished ...>
15607 <... open resumed> )              = 3
15606 <... open resumed> )              = -1 ENOENT (No such file or directory)
15606 open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY <unfinished ...>
15606 <... open resumed> )              = 3
15607 open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
15605 open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC <unfinished ...>
15605 <... open resumed> )              = 3
15607 open("/usr/lib64/charset.alias", O_RDONLY <unfinished ...>
15607 <... open resumed> )              = -1 ENOENT (No such file or directory)
15607 open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
15605 open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
15605 open("/usr/share/locale/en_AU.utf8/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15605 open("/usr/share/locale/en_AU/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15605 open("/usr/share/locale/en.utf8/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15605 open("/usr/share/locale/en/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15605 open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
15605 open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
15605 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
15605 open("/lib64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3
15605 open("/lib64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3
15605 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
15605 open("/lib64/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
15605 open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
15605 open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
15605 open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
15605 open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
15608 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
15608 open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
15608 open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
15609 open("./googleearth-bin", O_RDONLY) = 3
15609 open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
15609 open("/usr/share/locale/en_AU.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15609 open("/usr/share/locale/en_AU/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15609 open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15609 open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15609 open("/usr/share/locale/en_AU.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15609 open("/usr/share/locale/en_AU/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15609 open("/usr/share/locale/en.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
15609 open("/usr/share/locale/en/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
503 22:55:22 free $
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File exists (ls) but no such file or directory (cd) WalterWhite Linux - Newbie 9 01-29-2013 08:22 PM
[SOLVED] Bash: No such file or directory, when file actually exists. SkyerSK Linux - Software 13 02-06-2011 04:33 AM
cannot create directory even if file exists pratikvimal Linux - Newbie 7 06-15-2009 03:51 AM
no such file or directory exists when trying to execute a exe ryedawg Linux - Software 5 12-05-2005 05:42 AM
SIOCADDRT: File exists SIOCCADDRT: File Exists Failed to bring up eth0. opsraja Linux - Networking 0 01-10-2005 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration