安装rpms时如何指向新版本的gcc库 [英] How to point to the newer version of gcc libs when installing rpms

查看:203
本文介绍了安装rpms时如何指向新版本的gcc库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的Centos 6.4上安装Chrome。股票gcc是4.4.6,所以我自己在/opt/gcc-4.7.3中安装了4.7.3。还将/opt/gcc-4.7.3/bin添加到PATH,并将/opt/gcc-4.7.3/lib64添加到libstdc ++。so.6所在的LD_LIBRARY_PATH中。但是,当我安装chrome rpm时,仍然出现同样的错误:

I am trying to install Chrome on my Centos 6.4. The stock gcc is 4.4.6, so I installed 4.7.3 in /opt/gcc-4.7.3 myself. Also added /opt/gcc-4.7.3/bin to PATH and prepended /opt/gcc-4.7.3/lib64 to LD_LIBRARY_PATH where libstdc++.so.6 is located. However when I install chrome rpm, still got the same error:

rpm -ivh google-chrome-stable_current_x86_64.rpm 
warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
error: Failed dependencies:
    libstdc++.so.6(GLIBCXX_3.4.15)(64bit) is needed by google-chrome-stable-34.0.1847.132-1.x86_64

它清楚地表明GLIBCXX_3。 4.15在那里:

It clearly shows that GLIBCXX_3.4.15 is there:

/opt/gcc-4.7.3/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_FORCE_NEW
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

如何强制安装程序查看新版本libstdc ++。so.6?

How do I force installer to look at the newer version libstdc++.so.6?

推荐答案

RPM仅了解RPM安装的软件并注册在RPMDB中。在任意位置安装其他版本的软件并不意味着RPM知道它。

RPM only knows about software installed by RPM and registered in the RPMDB. Installing other versions of software in arbitrary locations doesn't mean RPM knows about it.

您的选择是通过RPM安装更新的GCC或使用 - nodeps 选项,它告诉RPM不检查依赖关系。如果您选择第二种方法,那么确保在运行时可以找到这些库是您的责任,例如,通过设置 LD_LIBRARY_PATH 或其他一些方法,例如将目录添加到 ldconfig 缓存。

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 ldconfig cache.

这篇关于安装rpms时如何指向新版本的gcc库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆