Link to home
Start Free TrialLog in
Avatar of lgv
lgv

asked on

ERROR: sh: can't map '/lib/libc.so.5'

My hw is i386SX 25MHz, 4MB RAM, VGA, 40MB Linux Native, 10MB Linux Swap, SoundBlaster with CD 2x, WD 80x3 Ethercard.

I install Slackware96 with "sbpcd" bootdisk and "color" rootdisk. I just install A series disks (default options). Since I have just 4MegRAM, I must activate swapping manually before setup. Sbpcd kernel recognizes my Slackware CD. So far so good.

After installation (no problem), I restart my machine from HDD, login as root and try to execute (before anything) the command:

man man

And I get these errors:

--------------------------------------------------------
sh: can't map '/lib/libc.so.5.3.12'
sh: can't map '/lib/libc.so.5'
fgets: No such file or directory
Error reading man page /usr/man/man1/man1.gz
No manual entry for man
--------------------------------------------------------

These also happen when I try to run 'setup' again, or any program such 'less'. If I do 'ls' before one of these errors, it works fine, but after them it crashes too. Seems that executing a medium sized program crashes my system, but I don't understand why I *can* run 'setup' booting from installation disks under the same conditions, and I can't boot from the same kernel installed in my hard disk.

Sure! Both libraries do indeed exist under /lib and libc.so.5 is a link to libc.so.5.3.12... 'setup' takes care or it.

What's more, I have the same distribution working fine in a Pentium 120, 16MB RAM, 300MB Linux Native, 32MB Linux Swap, ATAPI CD.

i386's hard disk (QUANTUM LP52 A 950 509 105, 49MB w/64kB cache, CHS=751/8/17) seems not to have badblocks.

With all these data... What the hell is messing me?
Thank you for your answers, please reply by e-mail if possible.

P.S.: I've been told that this might be a memory problem, so I've tried to enlarge swapping to 16MB, but nothing changes, and, as you can see I can't enlarge it much more.
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Try to install the kernel (and all applications) in the a.out binary format.
Avatar of cedric
cedric

Try to do : ldconfig -v
and watch the result to find your libc.
then try to launch applications again to see if it is corrected
Avatar of lgv

ASKER

Yeah, right. I've wasted tons of time till I realized. Ashaming. Not as subtle as I thought.
Well, with 4MB RAM, before running Slackware's setup you have to activate swap space manually. I thought this meant that you didnt't have to touch that option inside the program... WRONNNNNG...
You must activate that option, don't let the program execute 'mkswap' nor 'swapon' and... LET IT ADD THE PROPER LINE TO /etc/fstab.
If you don't, or don't add this line inmediately after booting from HD and reboot again, obviously you are left with about 2.5MB RAM (physical and virtual, since you don't have swapping space).
Well, I'm grateful to every people which tried to help (Vlad The Impaler <wrightl@tahoma.cwu.edu> did suggesting I should run 'free', which was indeed what I had to do to realize my mistake)

4 MB of RAM is *NOT ENOUGH*.  I'm running 16 MB of RAM and 32 MB of swapfile, and when I leave Xwindows running for a couple days or so on my RedHat system, I get the 'Can't map libc' error message myself.  What Linux is trying to tell you is, you've exhausted your availiable memory, therefore, it can't load libc into mem.

Considering that RAM prices are at a 10 year low, I'd look into upgrading your system RAM as much as you can afford.  32 megs should be fine, if your machine will take it.  Just remember to increase your swap space if you can, as well.  The rule of thumb on swap space is, twice physical memory if under 64 megs, and equal to physical memory if over 64 megs.
ASKER CERTIFIED SOLUTION
Avatar of JeffVoskamp
JeffVoskamp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial