Is it possible you're using a RHEL 6-Beta DVD on a RHEL 6.0 system?
It looks like RHEL 6 has always had glibc 2.12 but the beta release had glibc 2.11. I really can't find a definitive source that says what the 6-Beta had but find mentions of 2.11 on 6-Beta around the web like here and here. All of the CentOS src.rpms for 6.0 to 6.3 are glic 2.12 so the final release has always had 2.12.
Is it possible you initially installed from the 6-beta DVD but have upgraded to a newer RHEL release since then? If so, you really can't use the packages from an older RHEL DVD. If you're just trying to install gcc, you can run yum install gcc to get GCC 4.4.x. In general, installing through yum is preferred over the DVD since yum will automatically fetch the latest RPMs whereas the DVD might have an older version that has some bugs. If you really want the DVD method, you'll need to get a DVD that matches the RHEL 6 release you have installed.
cat /etc/redhat-release will tell you what version of RHEL you're running. I'm guessing you're on 6.0 since the version of glibc currently installed is from November 2010 (you should look in to upgrading to 6.3 at some point). As for how to tell what version the DVD is, I'm guessing if you boot from it, it will say RHEL 6 Beta or something on the splash screen. Maybe read the docs on the DVD to see if it references being a beta?
Is it possible you're using a RHEL 6-Beta DVD on a RHEL 6.0 system?
It looks like RHEL 6 has always had glibc 2.12 but the beta release had glibc 2.11. I really can't find a definitive source that says what the 6-Beta had but find mentions of 2.11 on 6-Beta around the web like here and here. All of the CentOS src.rpms for 6.0 to 6.3 are glic 2.12 so the final release has always had 2.12.
Is it possible you initially installed from the 6-beta DVD but have upgraded to a newer RHEL release since then? If so, you really can't use the packages from an older RHEL DVD. If you're just trying to install gcc, you can run yum install gcc to get GCC 4.4.x. In general, installing through yum is preferred over the DVD since yum will automatically fetch the latest RPMs whereas the DVD might have an older version that has some bugs. If you really want the DVD method, you'll need to get a DVD that matches the RHEL 6 release you have installed.
cat /etc/redhat-release will tell you what version of RHEL you're running. I'm guessing you're on 6.0 since the version of glibc currently installed is from November 2010 (you should look in to upgrading to 6.3 at some point). As for how to tell what version the DVD is, I'm guessing if you boot from it, it will say RHEL 6 Beta or something on the splash screen. Maybe read the docs on the DVD to see if it references being a beta?
You could download the source RPM and rebuild it so it uses the system libs you have (2.12).
What do I need to do to have a fresh arch install but with glibc-2.33-5-x86_64.pkg.tar.zst
If you just want the dynamic libraries from the other version of glibc you can simply use LD_LIBRARY_PATH. But if you want to fully use the other version you need to compile against the other version to get the static parts. And you might want to compile the other version of glibc as well to get all the hardcoded paths to point to your installation directory for loading datafiles and plugins (for NSS and gconv). Using --prefix=/usr/glibc2.3.4 will also set the soname of the dynamic loader to /usr/glibc2.3.4/lib/ld-linux.so.2 (or something similar depending on your architecture) which will be hardcoded into every program linked against it.
- Extract the 2nd version inside
/opt. - Use
LD_LIBRARY_PATHto look for libraries inside/optfirst.
I'm on gcc 11.2.0 which uses GLIBC 2.35. I'm trying to build for a colleague's VM, but it is complaining about GLIBC versions missing.
How can I either:
-
Compile an executable that can run without dependencies?
-
Control which GLIBC version is used? The best idea I have is to do a custom gcc build, but I'm having issues with my embedded toolchain interfering.
For #1, here is what I believe is the relevant portion of my current CMakeLists:
add_executable(myapp src/main.cpp ${myapp_core} ${myapp_data_structures} ${myapp_parser} ${myapp_utils} ${myapp_tests})
target_include_directories(myapp PRIVATE ./include)
target_include_directories(myapp PRIVATE ${Boost_INCLUDE_DIR})
target_link_libraries(myapp PRIVATE ${Boost_LIBRARIES})
target_link_directories(myapp PRIVATE ${Boost_LIBRARY_DIRS})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "Debug build")
set(myapp_warning_flags -Wall -Wextra -Wpedantic -Wno-sign-compare)
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
message(STATUS "Release build")
set(myapp_warning_flags -Wall -Wextra -Wpedantic -Wno-sign-compare)
set(myapp_optimization_flags -O3 -msse4.2)
if(${myapp_static_build})
message(STATUS "Static build")
set(myapp_linker_flags -static-libgcc -static-libstdc++ -static)
set(DBUILD_SHARED_LIBS OFF)
set(BUILD_SHARED_LIBS OFF)
set(Boost_USE_STATIC_LIBS ON)
else()
message(STATUS "Dynamic build")
set(myapp_linker_flags)
set(DBUILD_SHARED_LIBS ON)
set(BUILD_SHARED_LIBS ON)
set(Boost_USE_STATIC_LIBS OFF)
endif()
endif()
target_compile_options(myapp PRIVATE ${myapp_warning_flags} ${myapp_optimization_flags} ${myapp_linker_flags})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.
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.
Hi all, as some of you have already read on my previous post, I'm still testing the latest GLIBC versions on Ubuntu 18.04 to make AppImages compiled from newer distributions like Debian Unstable run smoothly.
Now I have created five scripts, each one will easily compile the latest versions of glibc for you (ie glibc-2.30, glibc-2.31, glibc-2.32, glibc-2.33 and glibc-2.34) into a dedicated directory in /opt.
For now these are for testing purposes only, you can do whatever you want with them.
My goal is to create a simple "glibc-$VERSION" command to run a newer AppImage. For now, the script that you will find in /opt/glibc-$VERSION at the end of the installation returns some errors that may be useful to better understand how to act.
As with any program installed via AM, you'll have the ability to edit the main script without having to use root privileges, and there's the ability to install / remove everything even without using AM.
To install/remove (for example) glibc-2.33 with AM:
sudo am -i glibc-2.33 or sudo am install glibc-2.33
sudo am -r glibc-2.33 or sudo am remove glibc-2.33
To install/remove glibc-2.33 without AM:
wget https://raw.githubusercontent.com/ivan-hc/AM-application-manager/main/programs/x86_64/glibc-2.33 && chmod a+x ./glibc-2.33 && sudo ./glibc-2.33
sudo /opt/glib-2.33/remove
If you want to test a newer AppImage from Debian Unstable (GLIBC 2.33 or newer) on older systems using programs managed by AM, try to install abiword, asunder, audacious, gimp, handbrake or vlc.
Contact me here or at https://github.com/ivan-hc/AM-application-manager
Thanks again to anyone who decides to carry out these experiments with me.
Hello everyone,
Is there a safe way to install older glibc on redhat 8 so I can get legacy applications that support older rhel 7 to run?
I was able to install the older rpm into a second directory, but when I tried to launch the application, it didn't use that glibc. If I try to ld_library_path, it breaks everything else since, of course, rhel 8 uses newer system glibc. Is there a way around this? Or do I need to use chroot or container of centos7?
Thanks
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.
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
I’m currently using GLIBC 2.35 on Ubuntu 22.04, and I want to update it (for gaming purposes).
I’m also aware that updating it isn’t as simple as typing:
“sudo apt update GLIBC yada yada”
or whatever, so I’m not entirely sure how to update it properly without bricking my install.
Any ideas on what to do?