On 07 Oct 2002 14:08:09 +0100 Dave Love <[EMAIL PROTECTED]> wrote: > > bash gives a variant on this error that makes it more obvious > > that it isn't the shell having the problem, but the user program. > > Not to detract from the main point, it can still be confusing in this > context if the relevant bits aren't there, e.g. (with bash): > > /usr/gnemul/solaris# mv usr/lib/ld.so.1 usr/lib/ld.so.1.x > /usr/gnemul/solaris# bin/ls > bash: bin/ls: No such file or directory
Hmmm. Your environment is different than mine? DebianWoody for SPARC? My Mandrake9/Intel & DebianWoody/SPARC give the same behaviour I quote here: v------------------------------------------------------------------ [EMAIL PROTECTED] 14:42:17 ~/tmp] :) ./tmp.pl bash: ./tmp.pl: /a/b/c/perl: bad interpreter: No such file or directory [EMAIL PROTECTED] 14:42:18 ~/tmp] :) bash --version GNU bash, version 2.05a.0(1)-release (sparc-unknown-linux-gnu) Copyright 2001 Free Software Foundation, Inc. [EMAIL PROTECTED] 14:42:26 ~/tmp] :) uname -a Linux ulterior 2.4.18 #2 Thu Apr 11 14:37:17 EDT 2002 sparc64 unknown ^------------------------------------------------------------------ My bash for Solaris gives the confusing output you describe: v------------------------------------------------------------------ [EMAIL PROTECTED] ~/tmp]$ ./tmp.pl bash: ./tmp.pl: No such file or directory [EMAIL PROTECTED] ~/tmp]$ bash --version GNU bash, version 2.03.0(1)-release (sparc-sun-solaris) Copyright 1998 Free Software Foundation, Inc. ^------------------------------------------------------------------ Also, when reproducing the error closer to how you did it (ie: shared lib not available, it looks like this (copied/pasted from two separate terminals, one logged in as root, other not): v------------------------------------------------------------------ [EMAIL PROTECTED] 15:10:35 ~] ## mv /usr/X11R6/lib/libSM.so.6.0 /usr/X11R6/lib/libSM.so.6.0.x `/usr/X11R6/lib/libSM.so.6.0' -> `/usr/X11R6/lib/libSM.so.6.0.x' . . . [EMAIL PROTECTED] 15:10:48 ~] :) xterm xterm: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory [EMAIL PROTECTED] 15:11:28 ~] :) cat /etc/ld.so.conf /usr/X11R6/lib ^------------------------------------------------------------------ The bash shell never figures in. Warning, purely conjecture: because I'm using ld rather than LD_LIBRARY_PATH to locate my shared libraries? This is, again, DebianWoody/SPARC. As for the original topic, it is clear that "cat" couldn't find a library it expected. I'd guess the "LD_LIBRARY_PATH" (not the ld.so.conf) isn't set up properly. I suspect that when he ran the Solaris "sh", it was able to source some profile that set the variable up correctly, whereas his bash did not source the profile and thus didn't know where to find its shared libraries. -- Tim Ellis Senior Database Architect Gamet, Inc.