zoukankan      html  css  js  c++  java
  • /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found,解压rpm包

    如果是64位系统报错信息如下:

     /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by

    原因是没有GLIBCXX_3.4.15版本,或是更高的版本。
    输入命令查询一下结果:

    [root@localhost ~]# strings /usr/lib/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

    我们看到当前GCC版本中的确没有GLIBCXX_3.4.15。

    64位系统命令为:

    [root@localhost ~]# strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

    64位系统:

    http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb

    假设下载的文件放在/data0/software/。

    64位系统为: 

    # ar -x libstdc++6_4.7.2-5_i386.deb && tar xvf data.tar.gz

    [root@localhost software]# cd  /data0/software/usr/lib/x86_64-linux-gnu
    [root@localhost x86_64-linux-gnu]# cp libstdc++.so.6.0.17 /usr/lib64
    [root@localhost x86_64-linux-gnu]# /usr/lib
    [root@localhost lib64]# rm libstdc++.so.6
    [root@localhost lib64]# ln libstdc++.so.6.0.17 libstdc++.so.6

    重新建立软连接,我们再输入命令查询一下结果:

    [root@localhost lib]# strings /usr/lib/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_DEBUG_MESSAGE_LENGTH

    已经安装好GLIBCXX_3.4.15啦。

    此外, 更新gcc-4.4.7到gcc-6.1.0, libstdc++支持情况如下: 

    $ strings 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
    GLIBCXX_FORCE_NEW
    GLIBCXX_DEBUG_MESSAGE_LENGTH

    $ sudo rpm -ivh google-chrome-stable_current_x86_64.rpm  #chrome-51版本
    error: Failed dependencies:
    libstdc++.so.6(GLIBCXX_3.4.18)(64bit) is needed by google-chrome-stable-51.0.2704.106-1.x86_64
    libstdc++.so.6(GLIBCXX_3.4.14)(64bit) is needed by google-chrome-stable-51.0.2704.106-1.x86_64
    libstdc++.so.6(GLIBCXX_3.4.15)(64bit) is needed by google-chrome-stable-51.0.2704.106-1.x86_64

    网上找到: libstdc++-6.1.1-3.fc24.i686.rpm

    解压rpm:  rpm2cpio libstdc++-6.1.1-3.fc24.i686.rpm | cpio -div

    cp /usr/local/lib/libstdc++.so.6.0.22 /usr/lib/  #拷贝32位的库
    cp /usr/local/lib64/libstdc++.so.6.0.22 /usr/lib64/ #
    拷贝64位的库,安装gcc-6.1后会有这一项
    ln -s /usr/lib/libstdc++.so.6.0.22 /usr/lib/libstdc++.so.6
    ln -s
    /usr/lib64/libstdc++.so.6.0.22 /usr/lib64/libstdc++.so.6
    仍然无法安装google最新版本. 使用强制安装:

    Your options are to install a newer GCC via RPM or install chrome using the --nodeps option, which tells RPM not to check dependencies. If you choose the second approach then it's your responsibility to make sure the libraries will be found at runtime, e.g. by setting LD_LIBRARY_PATH or some other method such as adding the directory to the ldconfigcache.

  • 相关阅读:
    hdu5728 PowMod
    CF1156E Special Segments of Permutation
    CF1182E Product Oriented Recurrence
    CF1082E Increasing Frequency
    CF623B Array GCD
    CF1168B Good Triple
    CF1175E Minimal Segment Cover
    php 正则
    windows 下安装composer
    windows apache "The requested operation has failed" 启动失败
  • 原文地址:https://www.cnblogs.com/timssd/p/5456006.html
Copyright © 2011-2022 走看看