[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: init script can't find /bin/dirname



On Mon, Dec 22, 2014 at 10:55:15AM -0500, Rob Owens wrote:
> On Mon, Dec 22, 2014 at 04:41:05PM +0100, Sven Joachim wrote:
> > On 2014-12-22 04:10 +0100, Rob Owens wrote:
> > > So I'm still not sure why /etc/init.d/mysql cannot find "dirname" and
> > > "basename" when running at system boot, but it can find them when run
> > > from a terminal after boot.
> > 
> > Maybe you have a /bin/dirname executable whose interpreter is missing,
> > e.g. it could be a 32-bit binary and you don't have libc6:i386
> > installed anymore.
> 
> That's it!  This system has a /bin/dirname as well as /usr/bin/dirname.
> When I call /bin/dirname from a shell, I get "-bash: /bin/dirname: No
> such file or directory".

$ ls -l /bin/dirname
-rwxr-xr-x 1 root root 13880 Jan 30  2007 /bin/dirname

$ file /bin/dirname
dirname: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped

Similar thing for /bin/basename and a bunch of other files that are
present in both /bin and /usr/bin.  For all the duplicates I've checked,
the files in /bin are 32-bit and are old, while the files in /usr/bin
are 64-bit and are recent.

So I guess for now I'm going to move all these obsolete files into
another directory and make sure the system works ok before I delete them
for good.  I'm not sure how this system ended up like this, but it's and
old system that's been dist-upgraded many times as well as having the
hard disk moved to different hardware.  

I checked Wheezy, Squeeze, and Lenny and the coreutils package doesn't 
put dirname or basename in /bin on any of those releases -- they go in 
/usr/bin.  I wasn't able to go farther back than that.  But 2007 is when 
Etch was released, and that was also the first Debian release I ever used.

Sven, thanks for your help.  Your tips got me heading down the right
track.

-Rob

Attachment: signature.asc
Description: Digital signature


Reply to: