Jump to content

Updating stdlibc++

- - - - -

  • Please log in to reply
7 replies to this topic

#1
ThemePark

ThemePark

    Programmer

  • Members
  • PipPipPipPip
  • 124 posts
I have made a program using the latest version of Ubuntu and it works fine there. Now I need to run it on an Amazon AMI with Fedora on it. However when I try to run it, I get the following errors:
./Puzzle Builder: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by ./Puzzle Builder)
./Puzzle Builder: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./Puzzle Builder)
./Puzzle Builder: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./Puzzle Builder)

I use the Fedora release 8 (Werewolf), GCC 4.1.2. There was a command to check the dependencies of my program and a command to check the version of libstdc++ but unfortunately I don't remember either.

I assume I will need to update libstdc++, but I can't find out how to do it with yum. I tried downloading the latest libstdc++ source, and configure it but it tells me that there's no install.sh file.

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
You can discover what it was linked with originally:
ldd ./Puzzle\ Builder
You can find out your current libraries as so:
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH
You may wish to reinstall GCC to 4.4.3 to get the appropriate libstdc++ headers that come with it, and a symbolic link may be needed if there are further libraries that ldd explains on your binary.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
ThemePark

ThemePark

    Programmer

  • Members
  • PipPipPipPip
  • 124 posts
Thanks, those were the commands that I had tried before but forgotten. This is the output of ldd:
./Puzzle Builder: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by ./Puzzle Builder)
./Puzzle Builder: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./Puzzle Builder)
./Puzzle Builder: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./Puzzle Builder)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaaaacc7000)
        libm.so.6 => /lib64/libm.so.6 (0x00002aaaaafc7000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaab24a000)
        libc.so.6 => /lib64/libc.so.6 (0x00002aaaab459000)
        /lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)

And this is the output of strings:
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBC_2.3
GLIBC_2.4
GLIBC_2.2.5
GLIBCXX_FORCE_NEW

GCC is of version 4.1.2. I agree that it would be a good idea to upgrade GCC, but I can't find a simple tutorial for doing that in Fedora, using yum. I'd rather not have to deal with building from source code, or downloading rpm, but rather just upgrade it like you'd do in Ubuntu with sudo apt-get upgrade. So how can I do the same in Fedora, using yum?

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
You can upgrade it most likely with the following command:
yum update packagename 
You should really upgrade the whole system (leaving packagename out) but that is up to you if you wish to risk a system update.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
ThemePark

ThemePark

    Programmer

  • Members
  • PipPipPipPip
  • 124 posts
Well, I tried that just now and it says that there are no packages found. I think that since it's an Amazon AMI, the list of mirrors is different from the list in a regular Fedora installation. Do you happen to have the mirror list and can tell me where I can find it so I can replace it?

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
A list of mirrors can be found here
GCC mirror sites - GNU Project - Free Software Foundation (FSF)

I had not used Fedora for very long, I am not sure if you'll need to upgrade glibc as well.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
ThemePark

ThemePark

    Programmer

  • Members
  • PipPipPipPip
  • 124 posts
Thanks but I meant where I could get the original file from a standard Fedora installation. But I haven't been able to find out which file is the hostfile used for yum. Do you know which one it is?

#8
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
I believe it is called mirrorlist.txt within /var/cache/yum/fedora and/or /var/cache/yum/updates folders.

I could be wrong, but it appears a default mirror list can be found here, be sure to update your arch. in the URL:
https://mirrors.fedo...ora-9&arch=i386
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users