Score:0

missing libm.so.6 and libstdc++.so.6

jp flag
A D

I have a program that I compiled through qt creator and appears to work fine on my computer but I'm trying to run it on a remote computer cluster and it spits out these error messages.

./programs/sampleapp: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by ./programs/sampleapp)
./programs/sampleapp: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ./programs/sampleapp)
./programs/sampleapp: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./programs/sampleapp)

I guess these dependencies are missing? I don't know where to find them. Googling for them doesn't lead me to anything that works and I've tried searching my own computer with no luck.

guiverc avatar
cn flag
Please refer https://askubuntu.com/help/on-topic, Ubuntu and official *flavors* of Ubuntu (https://ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes. *No on-topic system here provides the required library version so I'm betting you're not using an on-topic system*
hr flag
AFAIK the message doesn't mean that the libraries are *missing*, it means they're too old - or, more specifically, that the program was built against newer versions of the libraries than are present on the target system.
Knud Larsen avatar
by flag
Say your remote cluster has glibc / libc6 version 2.27 : You will then have to build your application with an "libc6 - 2.27 OS" .... or on an even older OS. .... Example : Ubuntu 18.04 has libc6 - 2.27 .
Score:1
es flag

You just discovered why you need to rebuild applications for different flavours or even versions of Linux. Some might run on some variety of other distributions, but there is no guarantee.

In general, build your application on the machine (or at least on a machine with the same distribution) that you want to run it on. Or, better yet, build software packages (.deb for Ubuntu / Debian, .rpm for SUSE / Red Hat / Fedora / CentOS) to automate the process and to ensure that dependencies (like those shared libs) are handled automatically.

No, that's not an easy thing to do, but it's a necessary thing.

A D avatar
jp flag
A D
Okay my system is Ubuntu based but the target is CentOS 7. So I guess I will try to write a makefile and see if I can build it in there with gcc. and then I will maybe make a deb in the future if I need to run this in a bunch of places.
HuHa avatar
es flag
Since you mentioned Qt in the keywords of your question, better start with QMake or CMake. Manually written Makefiles are too painful for today's complexity, in particular when it comes wo what shared libs you need to link to your project and the exact parameters for that. Both QMake and CMake do that for you.
A D avatar
jp flag
A D
I finally got it to run after building it remotely. The funny thing is I've transferred previous versions of the program built with QT locally and ran it no problem on the same cluster. But I just take out a few sources files and suddenly its not portable anymore. Now I have to figure out why.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.