[英]How to update glibc version safely?
First of all,I don`t have root permission, and I build the new version glibc and gcc to my home path ~/glibc-new and ~/gcc-new . 首先,我没有root权限,并且将新版本glibc和gcc构建到我的主目录〜/ glibc-new和〜/ gcc-new。
After that , I want to build the new nversion binutil to ~/new-world by using new glibc and gcc ,so I change my ~/.base_prefix to export PATH=~/gcc-new/bin:$PATH for using new gcc,it works. 之后,我想使用新的glibc和gcc将新的nversion binutil构建为〜/ new-world,所以我将〜/ .base_prefix更改为export PATH =〜/ gcc-new / bin:$ PATH以使用新的gcc ,有用。
Now how can I build the binutil or something else by new glibc? 现在如何通过新的glibc构建binutil或其他东西?
To change the new gcc specs file to point to ~/glibc-new/ld-linux.so.2? 要将新的gcc规范文件更改为指向〜/ glibc-new / ld-linux.so.2? It didn`t work,the newly binary is still using old version glibc
它没有用,新的二进制文件仍在使用旧版本的glibc
I tried to build my program before by using 我尝试通过使用来构建程序
-Wl,--rpath=<absolute path to glibc-new> \\ -Wl,--dynamic-linker=<absolute path to glibc-new>/ld-linux.so.2
gcc tell me that /usr/bin/ld : } No such file....., but I have it -Wl,--rpath=<absolute path to glibc-new> \\ -Wl,--dynamic-linker=<absolute path to glibc-new>/ld-linux.so.2
gcc告诉我/ usr / bin / ld:}没有这样的文件.....,但是我有
Try giving the following options to gcc when compiling your program: 尝试在编译程序时为gcc提供以下选项:
-Wl,--rpath=<absolute path to glibc-new> \
-Wl,--dynamic-linker=<absolute path to glibc-new>/ld-linux.so.2
In your case <absolute path to glibc-new>
should be something like /home/youruser/glibc-new
. 在您的情况下,
<absolute path to glibc-new>
应该类似于/home/youruser/glibc-new
。
The --rpath
is saying the runtime library loader where to look for libraries (you could also have set LD_LIBRARY_PATH
). --rpath
表示运行时库加载器在哪里查找库(您也可以设置LD_LIBRARY_PATH
)。
The --dynamic-linker
specifies the path of the dynamic linker you want to use. --dynamic-linker
指定要使用的动态链接器的路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.