0

I have recently installed Ubuntu 14.04 and I am not able to execute .out files in my folder. I am adding the output of various commands that I have tried.

The file name is a_lena.out

$ls -l a_lena.out
-rwxrwxr-x 1 gaurav gaurav 20966 Aug 18 06:52 a_lena.out  

$./a_lena.out
  bash: ./a_lena.out: No such file or directory

$echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

I was editing some configurations like : how to permanently save the brightness settings, downloading PPA on proxy, etc. May be I have messed up the system files.

Please let me know if some additonal information is needed.

Regards,

Gaurav

PS:Please also add suitable tags for this question.

UPDATE

I received this file, which is part of my assignment, from my friend. It is output file of an OpenCV program. I haven't compiled the file at my end. Because it as output of OpenCV program, it is supposed to depend on OpenCV libraries (I to have installed those files on my machine). The output of file command is :

   a_lena.out: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=6f48073f6000de3ec1fccc74bf5d5bbb29d24d6d, not stripped

From the discussion going on, I am getting the intuition that the file needs to be compiled at my machine and I should not expect any .out file to be executable. Please add some more clarification so that I don't do this silly mistake anymore as I am a greenhorn.

UPDATE 2

Output of ldd is :

not a dynamic executable

Output of dpkg-architecture is :

DEB_BUILD_ARCH=amd64
DEB_BUILD_ARCH_BITS=64
DEB_BUILD_ARCH_CPU=amd64
DEB_BUILD_ARCH_ENDIAN=little
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_GNU_CPU=x86_64
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=x86_64-linux-gnu
DEB_BUILD_MULTIARCH=x86_64-linux-gnu
DEB_HOST_ARCH=amd64
DEB_HOST_ARCH_BITS=64
DEB_HOST_ARCH_CPU=amd64
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_ARCH_OS=linux
DEB_HOST_GNU_CPU=x86_64
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=x86_64-linux-gnu
DEB_HOST_MULTIARCH=x86_64-linux-gnu
Gaurav
  • 111
  • 2
    what IS this file? what is it supposed to do? do file a_lena.out – wxl Sep 03 '14 at 17:23
  • 1
    What is the file supposed to do? Did you compile it and need to execute it? Does it depend on certain libraries that might not be installed? – Thomas Ward Sep 03 '14 at 17:27
  • 2
    @KasiyA Unless it absolutely needs superuser privileges, running with sudo won't be safe or secure and could cause badness. – Thomas Ward Sep 03 '14 at 17:28
  • @KasiyA still going to have the same security issue. if it compiled without error and produced the .out file then it shouldn't need sudo access to compile. – Thomas Ward Sep 03 '14 at 17:31
  • @KasiyA: compiling with sudo is not a good idea (from a security perspective) and is completely unnecessary. The suggestion to use sudo for compiling is unlikely to help with @Gaurav's query. – sladen Sep 03 '14 at 17:33
  • 1
    @KasiyA: if you wish to ask questions about sudo and good security practice, please consider starting a new question of your own. This thread is for responding to @Gaurav's question, and it would be polite to allow that to happen. – sladen Sep 03 '14 at 17:40
  • @sladen thanks I removed all comments. Thomas W. – αғsнιη Sep 03 '14 at 17:44
  • Please check the UPDATE in the post. – Gaurav Sep 03 '14 at 17:48
  • 1
    @Gaurav: please add the output of ldd a_lena.out (and/or ldd -v a_lena.out), plus the output of dpkg-architecture (see @marty-fried's answer below about a likely instruction set mismatch from trying to run a i386 binary on an amd64 operating system. PS. I would encourage you to try collaborating using source code rather than binaries! – sladen Sep 04 '14 at 00:10
  • @sladen : I have added the outputs in UPDATE 2 of the post. I understand that I should try compiling source code rather than executing the downloaded/copied/borrowed binaries. Thanks for helping me out. – Gaurav Sep 04 '14 at 05:08

1 Answers1

2

One would think by looking at the question that it is not possible; the file is there, but bash says it's not. So, there can only be one other answer - the file requires some other program to run it, and that program isn't found.

Since this appears to be the output of a compiler, I am guessing that it was compiled as a 32-bit dynamically linked executable on a 64-bit system; this requires a helper program to run it, and the helper program is the one not being found.

You can find out more about this here

Marty Fried
  • 18,466