"Can't load library 'foo'" messages

"Can't load library 'foo'" messages

Post by Glenn C. Hofman » Sat, 09 Aug 1997 04:00:00

I have been having this message come up when trying to compile several
packages (most recently bash-2.01).  I have looked everywhere for what
this means, with no luck.  The libraries are there, I have checked.  Any
ideas as to the cause of this message would be greatly appreciated.
Glenn C. Hofmann

To reply, you must remove the spaces in the reply to and reply
addresses.  Sorry for the inconvenience, this is to avoid spam.


1. 'echo "some text" |read foo' results in empty $foo


In a script that I'm working on, I do something like this:

echo "this is some text" |read foo bar baz
echo "the foo variable is: ${foo}"           # should be 'this'
echo "the bar variable is: ${bar}"           # should be 'is'
echo "the baz variable is: ${baz}"           # should be 'some text'

However, the output leaves no doubt that the three variables are unset.

TFM says:

     read name ...
          One line is read from the standard input and, using the
          internal  field separator, IFS (normally space or tab),
          to delimit word boundaries, the first word is  assigned
          to  the first name, the second word to the second name,
          and so forth, with leftover words assigned to the  last
          name.   Lines can be continued using \newline.  Charac-
          ters other than newline can be quoted by preceding them
          with a backslash.  These backslashes are removed before
          words are assigned to names, and no  interpretation  is
          done  on the character that follows the backslash.  The
          return code is 0, unless an EOF is encountered.

So I'm really not sure why it doesn't work. This is /bin/sh under Solaris
2.6, but of course I want the solution to be portable.

I could do something like

foo=`echo "this is some text" | awk '{ print $1 }'`
bar=`echo "this is some text" | awk '{ print $2 }'`

and so on... but that's both ugly and wasteful.

Replies sent directly to me will be summarized for the newsgroup.

Happy Hunting, -Chris

2. RedHat 5.1 Install LI.. Problem.

3. help: "emacs:can't load library 'libXt.so.6'" . . .

4. Unmounting Drives During Power Down.

5. "can't load library 'libXmu.so.6'"

6. Help On FTP VIA HTTP -- Browser does not list ftp directory?

7. Help: "tcsh: can't load library 'libc.so.5'" ??

8. Adding >4GB disk to rootvg

9. "can't load library 'libXpm.so.4'"

10. Why doesn't echo "text" 'command' "more text" work?

11. "can't find library 'libX11.so.6'"

12. "Can't find shared library 'libc.so.3.0'"