Solved

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

Posted on 1997-07-24
5
596 Views
Last Modified: 2013-12-15
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.
0
Comment
Question by:lgv
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1628873
Try to install the kernel (and all applications) in the a.out binary format.
0
 
LVL 2

Expert Comment

by:cedric
ID: 1628874
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
0
 

Author Comment

by:lgv
ID: 1628875
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)

0
 

Expert Comment

by:jamstar
ID: 1628876
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.
0
 

Accepted Solution

by:
JeffVoskamp earned 100 total points
ID: 1628877
It's a swap/memory problem.  Each program wants to keep a copy of the libraries in it's address space.  With only 4M of memory and no swap space this only allows a few processes to start up before the kernel realizes that it can't honour these requests for memory.  with a "/dev/XXXX  swap swap defaults" line in your /etc/fstab (where XXXX is your swap partition) the setup scripts
will enable the swap space and now you have 12.5M for memory.

Note that only 10M of swap space is very low if you plan on doing
any development work (gcc and friends eat memory) or if you're
running X.  Your setup will work, but expect to hear/see a lot
of disk access.  An extra 4M of RAM could add months/years to the life of your harddrive.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now