Link to home
Create AccountLog in
Avatar of apunkabollywood
apunkabollywoodFlag for United States of America

asked on

/bin/ksh: /lib/libc.so.6: version `GLIBC_2.4' not found (required by /bin/ksh)

Hello All,

I am facing this error while running a script - kindly help what could be the isssue?
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of apunkabollywood

ASKER

Still is there any way crating softlinks or downloading the upgarded version to reactify - How to do that if want to take risk - I am new to Debian - I am linux guy ..pls help
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of skullnobrains
skullnobrains

yeah, and an old version of glibc probably means ksh was updated without updating glibc. i guess debian handles such dependencies or there would be no point at all in packaging the base system itself.

---

the more you play with downloaded files, the more you will ruin your system

you need to use the package manager of your system, and as a best practice, when you update, either update everything or nothing if you don't want to face such problems. debian's packet manager is pretty good compared to the rest of the linux world, but it's still lamish at handling updates properly

in your case, i believe a good all global forced update would be great. then leave the system running without performing partial updates until you are proficient enough to deal with them
If do need packages that aren't native to your distro, it is best to install them from source.
Hello Duncan , Yes you are right its a issue of outdated lib please tell me the correct way and command to update this glibc package:

Here are the output you would like to see:

 #nm /lib/libc.so.6 GLIBC_2.4

/lib/libc.so.6:
nm: /lib/libc.so.6: no symbols
nm: 'GLIBC_2.4': No such file


/lib/libc.so.6            
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.5 (Debian 1:3.3.5-12).
Compiled on a Linux 2.6.0-test7 system on 2005-05-10.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
Report bugs using the `glibcbug' script to <bugs@gnu.org>.

Please help with the steps how to solve this issue.

Many thanks
dpkg -l | grep libc
ii  klibc-utils                       1.5.12-2                 small utilities built with klibc for early b
ii  libc6                             2.7-18                   GNU C Library: Shared libraries
ii  libc6-dev                         2.7-18                   GNU C Library: Development Libraries and Hea
ii  libc6-i686                        2.7-18                   GNU C Library: Shared libraries [i686 optimi
ii  libcap1                           1:1.10-14                support for getting/setting POSIX.1e capabil
ii  libcomerr2                        1.41.3-1                 common error description library
ii  libconsole                        1:0.2.3dbs-65.1          Shared libraries for Linux console and font
rc  libcups2                          1.3.8-1+lenny6           Common UNIX Printing System(tm) - libs
ii  libcwidget3                       0.5.12-4                 high-level terminal interface library for C+
ii  libklibc                          1.5.12-2                 minimal libc subset for use with initramfs
ii  liblocale-gettext-perl            1.05-4                   Using libc functions for internationalizatio
ii  linux-libc-dev                    2.6.26-19                Linux support headers for userspace developm
Above list is of working script server and below is the greped list of non working script server:
dpkg -l | grep libc
ii  altgcc         2.7.2.3-2      Alternate gcc package for the libc5 environm
ii  libc-bin       2.11.3-4       Embedded GNU C Library: Binaries
ii  libc5          5.4.46-15      The Linux C library version 5 (run-time libr
ii  libc5-altdev   5.4.46-15      The Linux C library version 5 (alternative d
ii  libc6          2.3.2.ds1-22   GNU C Library: Shared libraries and Timezone
ii  libc6-dev      2.3.2.ds1-22   GNU C Library: Development Libraries and Hea
ii  libcap1        1.10-14        support for getting/setting POSIX.1e capabil
ii  libcomerr2     1.37-2sarge1   common error description library
ii  libcompress-zl 1.34-1         Perl module for creation and manipulation of
ii  libconfig-inif 2.38-3         Read .ini-style configuration files
ii  libconsole     0.2.3dbs-56    Shared libraries for Linux console and font
ii  libcrypt-sslea 0.51-3         Support for https protocol in LWP
ii  libcurl3       7.13.2-2sarge4 Multi-protocol file transfer library, now wi
ii  libdb1-compat  2.1.3-7        The Berkeley database routines [glibc 2.0/2.
ii  liblocale-gett 1.01-17        Using libc functions for internationalizatio
ii  zlibc          0.9j-7         Uncompressing C Library
For more info:

Script working on 5.0.3

less /etc/debian_version
5.0.3
/etc/debian_version (END)

Script not working on 3.1

less /etc/debian_version
3.1

Please advice how to resolve it
your ksh is compiled against a different version of glibc than the system's

if i'm correct there, most/all ksh scripts will not run
--> some feedback would be great there

you need to understand that you cannot plug any libraries and binaries in a system and expect them to work. the library you are planning to download also has dependencies, which have dependencies themselves, and some of these dependencies may not be compatible with your kernel.

how did you install ksh on your 3.1 machine ?
--> an answer would be welcome


in your case, i believe a good all global forced update would be great. then leave the system running without performing partial updates until you are proficient enough to deal with them
Thanks Skullnobrains,

I dont know how it installed just i know i need to fix it ...so advice can I upgrade glibc or something or what kind of updation u r telling whole server or some packages.....or how i can again reinstall/upgrade ksh so that i can make it work...pls advice
Glibc6 is a self-contained group of libraries with no dependencies on other libraries. So it is fine to upgrade it, however you do that on Ubuntu. EXCEPT the kernel may be too old - what is the output from uname -r?
something like this should do

apt-get update ; # update the packages list
apt-get upgrade -f ksh # force update of ksh and dependencies

Open in new window


or even

apt-get update ; apt-get upgrade -f -y --force-yes

Open in new window


to update EVERYTHING

note that forced updates are considered bad practice by most people (including myself) and should not be performed unless your packaging system is already in a bad situation

if you don't know about update/install/uninstall commands, when using debian, the package manager is dpkg. it has a good man page. apt and aptitude are wrappers over dpkg, that will let you perform batch updates and the likes without typing many commands. they also have a good man page
@skullnobrains: It's glibc he needs to upgrade, not ksh. Or did you mean to put that?
working system:2.6.26-2-686

Non working system: 2.6.8-3-686-smp


Please advcie the steps and commands to uinstall the previous glibc package and install the new one
@duncan_roe : no. i assumed that apt would handle dependencies and upgrade the glib if needed. i also assumed it would update other needed packages, and that it would not upgrade glib if for example ksh was copied from another system and the packages version would work with the existing glibc

@apunkabollywood
upgrading all packages is performed using the same packaging system.
apt-get update # update packages list
apt-get upgrade glibc # upgrade glibc
you can also specify versions if needed. reed "man apt-get" and the other manual pages i mentioned.
dpkg -i libc6_2.7-18_i386.deb        
(Reading database ... 21519 files and directories currently installed.)
Preparing to replace libc6 2.3.2.ds1-22 (using libc6_2.7-18_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
readlink: invalid option -- e
Try `readlink --help' for more information.
Unpacking replacement libc6 ...
dpkg: error processing libc6_2.7-18_i386.deb (--install):
 trying to overwrite `/etc/ld.so.conf.d/libc.conf', which is also in package libc-bin
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 libc6_2.7-18_i386.deb
the steps you took are unclear.
did you manually download the .deb package you are trying to install ?
do you understand why you're going to break your system if it works ?
do you understand that it does not work because it conflicts with libc-bin ?
do you understand that specifying a package version should not be done in this way ?

if you do not understand any or part of this, either read about the packaging system or upgrade everything forcefully. if you do not, you will at best get something to work while you break something else.
Linux 2.6.8-3 was a very good revision but may be too old for the latest glibc. Or it may be OK.
Your attempt to upgrade glibc failed because you have an old readlink which does not have the -e option.
readlink comes from the coreutils package. This won't upgrade without a new glibc. So you might have to upgrade from a rescue disk.
Many Thanks Duncan and Skull for ur valuable advices ....M really confused now what should I do - I want to fix the script on same kernel - i dont want to upgrade whole server but m okay to upgrade glibc for the same so that this script can work ...so pls advice what should I do to do this ?
apt-get upgrade -f ksh
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  ksh libgcc1-dbg libstdc++6-4.3-dbg
The following packages will be upgraded:
  base-config bsdutils curl file flex grub gzip info libc6 libc6-dev libcurl3 libfreetype6 libfreetype6-dev libgdbm3 libgnutls11 libmagic1 libpcre3 libperl5.8 libsasl2
  libsasl2-modules libsensors3 libssl-dev libssl0.9.7 libtasn1-2 locales login man-db mount mutt openssl passwd perl perl-base perl-doc perl-modules sash ssh sudo tar tcpdump
  unzip util-linux vim vim-common
44 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 44.5MB of archives.
After unpacking 19.7MB disk space will be freed.
Do you want to continue? [Y/n] y
Err http://mlk-debian.bastion sarge/main libc6-dev 2.3.2.ds1-22sarge6
  Temporary failure resolving 'mlk-debian.bastion'
0% [Connecting to mlk-debian.bastion]
pls advice its stuck here what to do in this case?

If i need to update any list pls advice not not an debian expert ...so give me few steps if possible need to resolve it asap
dpkg -l | grep libc  
ii  altgcc         2.7.2.3-2      Alternate gcc package for the libc5 environm
ii  klibc-utils    1.5.12-2       small utilities built with klibc for early b
ii  libc-bin       2.11.3-4       Embedded GNU C Library: Binaries
ii  libc5          5.4.46-15      The Linux C library version 5 (run-time libr
ii  libc5-altdev   5.4.46-15      The Linux C library version 5 (alternative d
ii  libc6          2.3.2.ds1-22   GNU C Library: Shared libraries and Timezone
ii  libc6-dev      2.3.2.ds1-22   GNU C Library: Development Libraries and Hea
ii  libcap1        1.10-14        support for getting/setting POSIX.1e capabil
iU  libcomerr2     1.41.3-1       common error description library
ii  libcompress-zl 1.34-1         Perl module for creation and manipulation of
ii  libconfig-inif 2.38-3         Read .ini-style configuration files
iU  libconsole     0.2.3dbs-65.1  Shared libraries for Linux console and font
ii  libcrypt-sslea 0.51-3         Support for https protocol in LWP
iU  libcups2       1.3.8-1+lenny6 Common UNIX Printing System(tm) - libs
ii  libcurl3       7.13.2-2sarge4 Multi-protocol file transfer library, now wi
iU  libcwidget3    0.5.12-4       high-level terminal interface library for C+
ii  libdb1-compat  2.1.3-7        The Berkeley database routines [glibc 2.0/2.
ii  libklibc       1.5.12-2       minimal libc subset for use with initramfs
ii  liblocale-gett 1.01-17        Using libc functions for internationalizatio
ii  linux-libc-dev 2.6.26-19      Linux support headers for userspace developm
ii  zlibc          0.9j-7         Uncompressing C Library
# /etc/init.d/myscript start
/bin/ksh: /lib/libc.so.6: version `GLIBC_2.4' not found (required by /bin/ksh)

# dpkg -i ksh_93s+20080202-1_i386.deb
(Reading database ... 21127 files and directories currently installed.)
Preparing to replace ksh 93s+20080202-1 (using ksh_93s+20080202-1_i386.deb) ...
Unpacking replacement ksh ...
dpkg: dependency problems prevent configuration of ksh:
 ksh depends on libc6 (>= 2.7-1); however:
  Version of libc6 on system is 2.3.2.ds1-22.
dpkg: error processing ksh (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 ksh
sorry i was away

if you do not want to mess too much while your sysadmin is not there, leave libc alone, but pick an older version of ksh that will be compatible with your libc. this should definitely work providing you find an old enough version, and it does not seem too risky.

since mostly everything depends on glibc at some point, updating it without updating mostly everything is a bad idea, not to speak about kernel incompatibilities.

as a general rule, do not use packages that are not meant for your debian version
But my script asking for GLIBC 2.4 always ......what should I do for it

/etc/init.d/myscript start
/bin/ksh: /lib/libc.so.6: version `GLIBC_2.4' not found (required by /bin/ksh)


if updation of GLIBC not possible than should I need to change something in script ..?

Also some other script too require GLIBC 2.4 and same error coming and if aggree with my colleagues this Script was working before on same version but becaose of crash last week and than after recovery these issues are coming
where did you pick your version of ksh ?

install an older one, it will be compatible with your glib, the installation will work, and your script will work as well.
you mean to say remove the current one and than install the older one - from where i can pick that older package -which version shud i go for any idea?
This is the current one:

iU  ksh            93s+20080202-1 The real, AT&T version of the Korn shell
During some modification here is the new error what it could be :

/etc/init.d/MYSCRIPT start
cat: /usr/local/MYSCRIPT/Distant*: cannot open [No such file or directory]
nohup: appending output to `nohup.out'
nohup: cannot run command `/usr/local/MYSCRIPT/RHM/scripts/LancementAppli.ksh': No such file or directory
3.1 is sarge, you'd need a version issued around 2008

you do not answer my questions :(
i've been asking a number of times where you got that ksh version and how the problem started in the first place.

if you used apt or aptitude like i suggested, you would not have to bother. mlk-debian.bastion is an internal repository you must have configured and then removed. the default repositories (or rather the archive repositories given your debian version) should contain packages adapted to your system.
If you build ksh from source you should be OK
i'd say if the build succeed, it will definitely work without errors afterwards. i'm not sure building a recent ksh on an a deprecated debian version that has obviously been messed with will actually work.
Worth a try though
Thank you all ..but i am facing loads of diffculties in installing or removing pacakages ...also would you prefer some good sites from where i can download Debian 3.1 packages easily ......

and also advice isit okay to remove first all glibc packages and install them again as now the condition is messed up ..some package are updated and some are old..:(
you do not answer any of the questions i've been asking regarding the background. it would likely be much easier to help.

googling "debian packages", the first link is http://packages.debian.org, which is the proper one.

here is a search result for ksh, all distributions
http://packages.debian.org/search?keywords=ksh&searchon=names&suite=all§ion=all
you can see that sarge is missing as it is long deprecated
don't ask me why debian versions get deprecated that fast

i searched "debian archive packages" to find older ones, and got the following results
http://snapshot.debian.org/binary/ksh/

pick one around 2008. if it depends on an older glib then yours, pick the next
if it depends on a newer glib then yours, pick the previous
If it depends on an older glibc it'll just work - you won't even know.
Thank you