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.


Recommended Answers

All 4 Replies

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.

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- -> binutils- No luck. :(

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!

commented: he seems to know what he's doing! I'm sure others will benefit from this! +22

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.