0

I get this error message now when running the command 'strings' on any file. obviously I have the command 'ls' in my $PATH, so that isn't the issue. I haven't made any recent changes to anything except for a GTK upgrade to 2.4.0. 'strings' is obviously not dependant on GTK at all, so this isn't the issue. I noticed this about a week ago, but don't use the command 'strings' day to day so don't know when it actually started happening. Anyone seen this before?

Slackware 9.1
Kernel 2.4.25

If you need anymore info than that, let me know.

Thanks!

2
Contributors
4
Replies
6
Views
13 Years
Discussion Span
Last Post by alc6379
0

You've provided a good bit of info already. Did the command work before? It could be that a shared lib or something was changed since the last time you used that command.

Does it work as the root user? From the sounds of the error, it seems like the shell is trying to look for fopen. That's kind of odd. What little C programming I know tells me that fopen is a function withing the stdio.h library, not a function. It could be maybe you need to run ldconfig or something. Either that, or the fopen function isn't finding some file or something. Try running alias and see if strings is aliased to some other command, perhaps.

0

Thanks for your advice! Unfortunately... it isn't aliased to anything, I run ldconfig at every boot, and every time I install anything, so that was of no help. I did try this though:

::[brandon@moonshine][~]::ldd `which strings`
not a dynamic executable

That is interesting, so I tried:

::[brandon@moonshine][~]::file !$
file `which strings`
/usr/sbin/strings: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped

Aha! It is statically linked! So I tried updating the Slackware package. Seems they provide an update from binutils-2.14.90.0.6 -> binutils-2.15.90.0.1.1. No luck. :(

1

Not sure how slackware has binutils 2.15 if gnu doesn't have it.... anyways. Built binutils 2.14 from source, using shared libs, and bam, everything works fine now:

::[brandon@moonshine][~]::ldd `which strings`
libc.so.6 => /lib/libc.so.6 (0x4002f000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Thank you alc6379 for mentioning 'ldconfig'. It reminded me to check for any shared libs it uses, which led me to seeing it is statically linked, and so on. God it's late, and been a long week. Thanks again!

Votes + Comments
he seems to know what he's doing! I'm sure others will benefit from this!
0

Excellent! I wasn't sure whether the default binutils slackware provided were statically or dynamic. That's what made me think of checking out ldconfig. Here's something to think about: if you have the time, statically compile binutils. Place it in /usr/local instead of the main root, and then modify your PATH variable to look in /usr/local/sbin (or bin) before looking in /sbin or /bin. I'd be curious as to whether it mattered that it was statically or dynamically linked.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.