glibc

升级glibc导致ssh登录出现问题

匿名 (未验证) 提交于 2019-12-03 00:22:01
注明: 本文章转自内部论坛并修改,侵泄删!!! [root@yanta ~]$ ssh node grep: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument /bin/grep: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument /bin/grep: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument /bin/grep: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument /bin/grep: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument /bin/ps: error while

centos6系列更换阿里yum源

匿名 (未验证) 提交于 2019-12-03 00:17:01
一、先升级gcc 这里配置yum源来升级 centos6系列更换阿里yum源 1.首先备份原来的cent os官方yum源 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 2.获取阿里的yum源覆盖本地官方yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 3.清理yum缓存,并生成新的缓存 yum clean all yum makecache 二、升级glibc版本到指定版本,也可以自己下载别的版本 1)产生原因 是由于Linux系统的glibc版本太低,而软件编译时使用了较高版本的glibc引起的! 查看系统glibc支持的版本 [root@localhost ~] GLIBC_2.2.5 GLIBC_2.2.6 GLIBC_2.3 GLIBC_2.3.2 GLIBC_2.3.3 GLIBC_2.3.4 GLIBC_2.4 GLIBC_2.5 GLIBC_2.6 GLIBC_2.7 GLIBC_2.8 GLIBC_2.9 GLIBC_2.10 GLIBC_2.11 GLIBC_2.12 GLIBC_PRIVATE [root@localhost

yum安装gcc

匿名 (未验证) 提交于 2019-12-03 00:05:01
  如果服务器是自己的,并且机器就在身边,那什么都不用说了,缺少gcc顶多就是重新放入安装盘,把开发工具包安装上。但是如果是租的服务器,托管服务 方那帮人又搞不懂你说的啥子gcc,要安装gcc实在是太麻烦了。你得去找gcc相关的包,版本号还得必须对应上,否则不兼容。最近给一个朋友装gcc, 着实头疼了一把。后来发现yum这个好东西,只需要执行一个命令,所有的烦恼都解除了。 朋友的系统是CentOS 5 的,托管商没给安装gcc,于是使用如下两个命令就可把gcc,gcc-c++统统安装上: yum - y install gcc yum - y install gcc - c ++ yum会自动查找软件的相关依赖包,自动下载安装,全过程轻松愉快。特此记录一下。 [ root@localhost Jorcen ]# yum - y install gcc Loaded plugins : fastestmirror , langpacks , refresh - packagekit livna | 1.3 kB 00 : 00 rpmfusion - free - updates | 3.3 kB 00 : 00 rpmfusion - nonfree - updates | 3.3 kB 00 : 00 updates / 19 / x86_64 / metalink | 4.0

交叉编译详解

匿名 (未验证) 提交于 2019-12-02 22:56:40
对于没有做过嵌入式编程的人,可能不太理解交叉编译的概念,那么什么是交叉编译?它有什么作用? 在解释什么是交叉编译之前,先要明白什么是本地编译。 本地编译 本地编译可以理解为,在当前编译平台下,编译出来的程序只能放到当前平台下运行。平时我们常见的软件开发,都是属于本地编译: 比如,我们在 x86 平台上,编写程序并编译成可执行程序。这种方式下,我们使用 x86 平台上的工具,开发针对 x86 平台本身的可执行程序,这个编译过程称为本地编译。 交叉编译 交叉编译可以理解为,在当前编译平台下,编译出来的程序能运行在体系结构不同的另一种目标平台上,但是编译平台本身却不能运行该程序: 比如,我们在 x86 平台上,编写程序并编译成能运行在 ARM 平台的程序,编译得到的程序在 x86 平台上是不能运行的,必须放到 ARM 平台上才能运行。 之所以要有交叉编译,主要原因是: 交叉编译的困难点在于两个方面: 不同的体系架构拥有不同的机器特性 交叉编译时的主机环境与目标环境不同 Configuration issues: HOSTCC vs TARGETCC: Toolchain Leaks: Libraries: Testing: 详细的对比可以参看这篇文章,已经写的很详细了,在这就不细说了: Introduction to cross-compiling for Linux

提示\"libc.so.6: version `GLIBC_2.14' not found\"

匿名 (未验证) 提交于 2019-12-02 21:59:42
启动php 提示"libc.so.6: version `GLIBC_2.14' not found", 原因可能是glibc版本太低,php使用了较高的glibc版本引起的 1,首先查看系统glibc的版本 2,可以看到最高的版本是会2.12,所以考虑编译解决这个问题,下载所需要升级的版本 3,解压 $ mkdir build $ cd build $ export CFLAGS="-g -O2" $./glibc-2.14/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin 安装编译过程中需要注意两点: 4,安装完后,可以查看ls -l /lib/libc.so.6已升级 文章来源: 提示\"libc.so.6: version `GLIBC_2.14' not found\"

glibc2.12升级至2.15

匿名 (未验证) 提交于 2019-12-02 21:59:42
1、操作系统版本 [root@localhost ~]# cat /etc/redhat-release #CentOS release 6.9 (Final) 2、当前glibc版本 [root@localhost ~]# /lib64/libc.so.6 GNU C Library stable release version 2.12, by Roland McGrath et al. 3、安装glibc2.15 [root@localhost ~]# wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz [root@localhost ~]# tar zxf glibc-2.15.tar.gz [root@localhost ~]# ./glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin [root@localhost ~]# make [root@localhost ~]# make install PS:如果进入glibc源码目录再执行./configure会报错 4、查看安装之后的版本 [root@localhost ~]#

Centos7,-bash: /root/software/jdk/jdk1.8.0_91/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No

匿名 (未验证) 提交于 2019-12-02 21:59:42
安装jdk时,缺少正常的C运行库 sudo yum install glibc . i686 glibc是GNU发布的libc库,即c运行库。glibc是linux系统中最底层的api,几乎其它任何运行库都会依赖于glibc。 来源:51CTO 作者: 转让半包_辣条 链接:https://blog.csdn.net/qq_38973672/article/details/102777628

离线(不联网)安装gcc4.8.5

匿名 (未验证) 提交于 2019-12-02 21:56:30
1 楔子   原来机器gcc版本是4.4.6,不支持cpp11,很麻烦需要升级,但是机器不能连外网,只能离线安装,十分麻烦; 2 gcc4.8.5离线安装,通过rpm包;   详情如下:   将上述资源上传到服务器,并cd到该文件夹下;   安装命令:   原因: 系统的glibc版本太低,软件编译时使用了较高版本的glibc引起的;     strings /lib64/libc.so.6 |grep GLIBC_ 查看目前支持的glibc版本,最高是2.12;需要安装2.14版本;     去 http://www.gnu.org/software/libc/ ,下载2.14版本;拷贝到线上机器     命令如下:       mkdir build       ../configure --prefix=/opt/glibc-2.14       make -j4       sudo make install       export LD_LIBRARY_PATH=/opt/glibc-2.14/lib:$LD_LIBRARY_PATH 加环境变量; 4 验证:    文章来源: 离线(不联网)安装gcc4.8.5

How do I build into a specified directory using the “prefix” option of configure?

岁酱吖の 提交于 2019-12-02 21:54:21
问题 I am trying to build glibc 2.27 on Clear Linux, obtained here: https://www.gnu.org/software/libc/sources.html According to the help, I should build into a directory outside of the source folder using the prefix command. As far as I can tell, I am doing what is described in the installation help: Configuring and compiling the GNU C Library The GNU C Library cannot be compiled in the source directory. You must build it in a separate build directory. For example, if you have unpacked the GNU C

What size should I allow for strerror_r?

喜夏-厌秋 提交于 2019-12-02 21:53:17
The OpenGroup POSIX.1-2001 defines strerror_r , as does The Linux Standard Base Core Specification 3.1 . But I can find no reference to the maximum size that could be reasonably expected for an error message. I expected some define somewhere that I could put in my code but there is none that I can find. The code must be thread safe. Which is why strerror_r is used and not strerror. Does any one know the symbol I can use? I should I create my own? Example int result = gethostname(p_buffy, size_buffy); int errsv = errno; if (result < 0) { char buf[256]; char const * str = strerror_r(errsv, buf,