It turns out I was just not familiar enough with apt-get. I managed to install the necessary glibc version by issuing the following command:
apt-get install libc-bin=2.13-38+deb7u4 libc6=2.13-38+deb7u4
I even downgraded it and everything works okay. Core dump analysis works now.
Answer from Matthias Gerstner on Stack ExchangeIt turns out I was just not familiar enough with apt-get. I managed to install the necessary glibc version by issuing the following command:
apt-get install libc-bin=2.13-38+deb7u4 libc6=2.13-38+deb7u4
I even downgraded it and everything works okay. Core dump analysis works now.
I wouldn't install it, but unpack it in some work directory and refer to it via LD_LIBRARY_PATH. Downgrading your libc6 package can be quite problematic.
Your customer should be able to supply you with their libc6 version. It might, however, be advisable to use the libc6-dbg package which includes debug symbols. Unfortunately the 7u4 version is an older one and not available anymore.
I was able to install libc6 2.17 in Debian Wheezy by editing the recommendations in perror's answer:
IMPORTANT
You need to exit out of your display manager by pressing CTRL+ALT+F1.
Then you can stop x (slim) with sudo /etc/init.d/slim stop
(replace slim with mdm or lightdm or whatever)
Add the following line to the file /etc/apt/sources.list:
deb http://ftp.debian.org/debian experimental main
Should be changed to:
deb http://ftp.debian.org/debian sid main
Then follow the rest of perror's post:
Update your package database:
apt-get update
Install the glibc package:
apt-get -t sid install libc6-amd64 libc6-dev libc6-dbg
IMPORTANT
After updating libc6, restart the computer, and you should comment out or remove the sid source you just added (deb http://ftp.debian.org/debian sid main), or else you risk upgrading your whole distro to sid.
Your script contains errors as well, for example if you have dos2unix installed your install works but if you don't like I did then it will fail with dependency issues.
I found this by accident as I was making a script file of this to give to my friend who is new to Linux and because I made the scripts on windows I directed him to install it, at the time I did not have dos2unix installed thus I got errors.
here is a copy of the script I made for your solution but have dos2unix installed.
#!/bin/sh
echo "deb http://ftp.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get update
apt-get -t sid install libc6 libc6-dev libc6-dbg
echo "Please remember to hash out sid main from your sources list. /etc/apt/sources.list"
this script has been tested on 3 machines with no errors.
debian - Need to install glibc >= 2.14 on Wheezy - Unix & Linux Stack Exchange
How do I install the glibc info manual in debian.
How do i get a newer version of glibc? (2.38 or above?)
glibc - Install libc-bin 2.36 on Debian 11 - Unix & Linux Stack Exchange
You don't have to switch to the unstable to get glib >= 2.14. In fact, the testing branch (now stable, or Jessie) has glib-2.17 which you can pick just adding the testing repository and launching:
sudo apt-get install libc6-dev=2.17-7
or,
sudo apt-get -t testing install libc6-dev
You can add the switch --dry-run to see what will being installed before hand. You can see the status of the glibc package in the Debian Package Tracker System (Debian renamed eglibc package to simply glibc from Jessie onwards).
You can also just wait for Jessie release on April 25.
In my situation, the error appears when I try to run an application (compiled on Ubuntu 12.04 LTS) using GLIBC_2.14 on Debian Wheezy (which installs glibc 2.13 by default).
I use a tricky way to run it, and get correct result:
Download
libc6andlibc6-devfrom Ubuntu 12.04 LTSRun
dpkgcommand to install them into a directory (/home/user/fakeroot/for example):$ dpkg -x libc6-dev_2.15-0ubuntu10.6_amd64.deb /home/user/fakeroot/ $ dpkg -x libc6_2.15-0ubuntu10.6_amd64.deb /home/user/fakeroot/Run your command with specified
LD_LIBRARY_PATH:$ LD_LIBRARY_PATH=/home/user/fakeroot/lib/x86_64-linux-gnu/ YOUR_COMMANDMy application only uses
memcpy()from GLIBC_2.14, and it works.I don't know whether it will work successfully for other applications.
Hello,
I'm trying to install the glibc info manual from here: https://www.gnu.org/software/libc/manual/ . But so far I'm failing. Can someone walk me through?
Thanks
Basically im trying to run a game but it requires at least glibc 2.38 but it seems debian only offers 2.36 at the moment. Any way i can get a newer vesion of it?
EDIT: ended up just downloading the windows version of the game and running it with wine, im an idiot and thought i was having a problem with the sound when i first downloaded, that's why i tried the linux binary, but when i ran it with wine again i found out that the game came muted by default and that i had to press + to get the volume up
If you need glibc version other than the one shipped with ubuntu, one way is to install manually to a temp location in your $HOME. (installing in /usr would mess up with existing glibc in case something goes wrong)
mkdir $HOME/glibc/ && cd $HOME/glibc
wget http://ftp.gnu.org/gnu/libc/glibc-2.32.tar.gz
tar -xvzf glibc-2.32.tar.gz
mkdir build
mkdir glibc-2.32-install
cd build
~/glibc/glibc-2.32/configure --prefix=$HOME/glibc/glibc-2.32-install
make
make install
Now you should have glibc 2.32 installed in the installation directory.
You may check with ~/glibc/glibc-2.32-install/bin/ldd --version
Building on Shalini's answer,
#!/bin/bash
SOFTWARE_NAME=$1
SOFTWARE_VERSION=$2
export DOWNLOAD_INSTALL_DIR=$SOFTWARE_NAME-$SOFTWARE_VERSION-download-install
if [ -f $DOWNLOAD_INSTALL_DIR ];
then
rm -fr $DOWNLOAD_INSTALL_DIR
echo "Remove $DOWNLOAD_INSTALL_DIR"
fi
mkdir $HOME/$DOWNLOAD_INSTALL_DIR/ && cd $HOME/$DOWNLOAD_INSTALL_DIR
echo "Current directory at $PWD"
export DOWNLOADED_TAR=$HOME/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION.tar.gz
if [ ! -f $DOWNLOADED_TAR ]; then
wget https://ftp.gnu.org/gnu/$SOFTWARE_NAME/$SOFTWARE_NAME-$SOFTWARE_VERSION.tar.gz -P $HOME/$DOWNLOAD_INSTALL_DIR
echo "Software is downloaded: $SOFTWARE_NAME, version = $SOFTWARE_VERSION "
else
echo "Software is ALREADY downloaded: $SOFTWARE_NAME, version = $SOFTWARE_VERSION at $DOWNLOADED_TAR"
fi
tar -xvzf $DOWNLOADED_TAR -C $HOME/$DOWNLOAD_INSTALL_DIR
mkdir $HOME/$DOWNLOAD_INSTALL_DIR/build
export SOURCE_DIR=$HOME/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION-install
mkdir $SOURCE_DIR
cd $HOME/$DOWNLOAD_INSTALL_DIR/build
~/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION/configure --prefix=$SOURCE_DIR
make
make install
export SOFTWARE_PATH=$HOME/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION-install/bin/$SOFTWARE_NAME
if [ -f $SOFTWARE_PATH ]; then
echo "Software is found: $SOFTWARE_NAME, version = $SOFTWARE_VERSION at $SOFTWARE_PATH"
mv $SOFTWARE_PATH $GRAND_ROOT_BIN
fi
You can use the script like so bash script-name.sh bison 3.8 for downloading GNU's bison with version number 3.8.