Exec No Such File Or Directory
Jun 02, 2006 Hi Minesh, Thanks for your help. The problem was already resolved. The cause of this problem is the uploaded program is in different format. I got the latest program and replace the existing program in the UNIX. $ file gzip gzip: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped I wasn't able to execute this program. If I tried, this happened: $./gzip -bash:./gzip: No such file or directory ldd was similarly unhappy with.
Company profile pdf. 25+ Company Profile Samples – PDF. You may have very compelling content to put in your company profile, but when the design does not encourage people from reading it or, worse, discourage them, the profile does not work. You then need to carefully think about the design of your company profile. People are visual beings.
I was installing a binary Linux application on Ubuntu 9.10 x86_64. The app shipped with an old version of gzip (1.2.4), that was compiled for a much older kernel:
I wasn't able to execute this program. If I tried, this happened:
ldd was similarly unhappy with this binary:
I'm curious: What's the most likely source of this problem? A corrupted file? Or a binary incompatibility due to being built for a much older {kernel,libc,..}?
Per nos's suggestsions, here's the output of strace ./gzip
:
Here's the output of readelf -a ./gzip
:
8 Answers
The answer is in this line of the output of readelf -a
in the original question
I was missing the /lib/ld-linux.so.2 file, which is needed to run 32-bit apps. The Ubuntu package that has this file is libc6-i386.
Lorin HochsteinLorin HochsteinYou get this error when you try to run a 32-bit build on your 64-bit Linux.
Also contrast what file
had to say on the binary you tried (ie: 32-bit) with what you get for your /bin/gzip
:
which is what I get on Ubuntu 9.10 for amd64 aka x86_64.
Edit: Your expanded post shows that as the readelf
output also reflects a 32-bit build.
Old question, but hopefully this'll help someone else.
In my case I was using a toolchain on Ubuntu 12.04 that was built on Ubuntu 10.04 (requires GCC 4.1 to build). As most of the libraries have moved to multiarch dirs, it couldn't find ld.so. So, make a symlink for it.
Check required path:
Create symlink:
If you're on 32bit, it'll be i386-linux-gnu and not x86_64-linux-gnu.
I think you're x86-64 install does not have the i386 runtime linker. The ENOENT is probably due to the OS looking for something like /lib/ld.so.1 or similar. This is typically part of the 32-bit glibc runtime, and while I'm not directly familiar with Ubuntu, I would assume they have some sort of 32-bit compatibility package to install. Fortunately gzip only depends on the C library, so that's probably all you'll need to install.
It is possible that the executable is statically linked and that is why ldd gzip
does not see any links - because it isn't. I don't know much about things that far back so I don't know if there would be incompatibilities if libraries are linked in statically. I might expect there to be.
I know it's the most obvious thing going and I'm sure you've done it, but chmod +x ./gzip
, yes? No such file or directory is a classic symptom of that not being done, that's why I mention it.
I also had problems because my program interpreter was /lib/ld-linux.so.2 however it was on an embedded device, so I solved the problem by asking gcc to use ls-uClibc instead as follows:
Well another possible cause of this can be simple line break at end of each line and shebang lineIf you have been coding in windows IDE its possible that windows has added its own line break at the end of each line and when you try to run it on linux the line break cause problems
Exec User Process Caused No Such File Or Directory
Not the answer you're looking for? Browse other questions tagged linux or ask your own question.
I have a bunch of folders which have a subfolder somewhere called 360.
output:
For each found item, I want to do a curl call, and trigger a Jenkins build job.My problem is that ./ part at the start. I should be able to cut it off like this:
But because it starts with a ./ it will just be executed ('No such file or directory').How can I get the output from find, without the leading ./
?
update:
Here is the whole thing with a jenkins curl call:
output
Kusalananda♦2 Answers
You write
because it starts with a ./ it will just be executed ('No such file or directory').
This isn't what's happening. You have provided a single command to the find .. -exec
parameter of echo '{}'
. Note that this is not echo
and the directory found by find
; it's a single command that includes a space in its name. The find
command (quite reasonably) cannot execute a command called echo './workspace/6875538616c6/raw/2850cd9cf25b/360'
.
Remove the single quotes around the -exec
parameter and you may find you don't need any additional changes or workarounds:
Similarly here you need to remove the quoting of the entire value passed to -exec
. But in this case you still need to quote the storage arguments so the shell cannot interpret &
, etc.
The issue is you are quoting both the utility name and the argument as a single string, which causes find
to try to execute the whole thing as the name of the command.
Instead use
Rm No Such File Or Directory
In some older implementations of find
, {}
won't be recognized as the pathname that find
has found when it's concatenated with another string as above, and you would have to use a child shell instead:
With your call to curl
:
See also:
In bash
:
The globstar
shell option makes the **
glob pattern available. It works like *
, but matches across slashes in pathnames.