Support Questions
Find answers, ask questions, and share your expertise

Upgrade the gcc and install the newest gcc manually(use make, make install), the libstdc++.so.6(GLIBCXX_3.4.21)(64bit) couldn't be found during the RPM install

Upgrade the gcc and install the newest gcc manually(use make, make install), the libstdc++.so.6(GLIBCXX_3.4.21)(64bit) couldn't be found during the RPM install

New Contributor

I have two questions which really blocked me a long time, many thanks for any help!

  • 1.When I install a RPM package, it always reports “libstdc++.so.6(GLIBCXX_3.4.21)(64bit) is needed”.

# rpm -ivh my-0.1.0-18.9.x86_64.rpm

error: Failed dependencies:

libstdc++.so.6(GLIBCXX_3.4.21)(64bit) is needed by my-0.1.0-18.9.x86_64

  • 2.Based on the search, I use following commands to check the dynamic libstdc++.so installation.

The version to GLIBCXX_3.4.22 has been installed and the libstdc++.so.6 points to libstdc++.so.6.0.22.

/usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.22

  • 1)Any suggestions how I should do to solve the dependency issue?
  • 2)Beside the issue, I want to confirm how did the RPM find the dependency, e.g.,

If A depends on B. When install the A rpm package, we need to install the B firstly.

My question is: Whether the B must be installed by rpm package? if I download the zip package and use “make install” to install in manual way, how the B could be found by A.

  • 3) For my case, now I upgrade the gcc from 4.8.5(Centos 7 maintained) to 5.1.0, and use "make, make install" to upgrade it, how I should do to let the RPM find libstdc++.so.6.0.21?

Thanks very much for any help!

# 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_3.4.14

GLIBCXX_3.4.15

GLIBCXX_3.4.16

GLIBCXX_3.4.17

GLIBCXX_3.4.18

GLIBCXX_3.4.19

GLIBCXX_3.4.20

GLIBCXX_3.4.21

GLIBCXX_3.4.22

# ll /usr/lib64/libstdc++.so.6

lrwxrwxrwx. 1 root root 19 Sep 6 05:16 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.22


Thanks

Darcy