centos安装xampp后报错:egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
1、centos6.9安装xampp(xampp-linux-x64-7.0.21-0-installer.run)后启动的时候,报错:
2. 有人说少了glibc包,但是机器不缺少报错的包
3.正确答案:
vi /opt/lampp/lampp
找到export LD_ASSUME_KERNEL=2.2.5这一行,
并修改内容为export LD_ASSUME_KERNEL=2.8.0,保存退出就可以解决了。
当然修改为不低于2.6.32的其他值也可以,比如2.6.32,我的系统内核是3.10,也可以配置3.10
系统内核:more /proc/version
4.找了下这个设置的资料解释,原来这个配置是为了旧操作系统的一些兼容性问题
LD_ASSUME_KERNEL
What is LD_ASSUME_KERNEL all about?
The environment variable LD_ASSUME_KERNEL can be set to a value that indicates the kernel OS API version an application is compatible with and is used by the Linux Dynamic Linker/Loader for determining what directory paths to use when loading the Standard C Library (GLIBC or libc.so.6). This is the primary mechanism for dealing with backwards compatibility for applications written for older Linux versions.
Here are the directory paths that are chosen based on the setting of LD_ASSUME_KERNEL:
/lib/libc.so.6
/lib/i686/libc.so.6
/lib/tls/libc.so.6
One of the primary distinguishers of features is the difference between the older LinuxThreads POSIX threading model and the newer threading model NPTL (Native POSIX Thread Library). This can be determined as follows on a Linux BASH command line;
developer@linux:~> /lib/libc.so.6 GNU C Library stable release version 2.3.5 (20050802), by Roland McGrath et al. Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Configured for i686-suse-linux. Compiled by GNU CC version 4.0.2 20050901 (prerelease) (SUSE Linux). Compiled on a Linux 2.6.12 system on 2005-09-09. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others linuxthreads-0.10 by Xavier Leroy GNU Libidn by Simon Josefsson NoVersion patch for broken glibc 2.0 binaries BIND-8.2.3-T5B libthread_db work sponsored by Alpha Processor Inc NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Thread-local storage support included. For bug reporting instructions, please see: <http://www.gnu.org/software/libc/bugs.html>. developer@linux:~>
developer@linux:~> /lib/tls/libc.so.6 GNU C Library stable release version 2.3.5 (20050802), by Roland McGrath et al. Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Configured for i686-suse-linux. Compiled by GNU CC version 4.0.2 20050901 (prerelease) (SUSE Linux). Compiled on a Linux 2.6.12 system on 2005-09-09. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others Native POSIX Threads Library by Ulrich Drepper et al GNU Libidn by Simon Josefsson NoVersion patch for broken glibc 2.0 binaries BIND-8.2.3-T5B NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Thread-local storage support included. For bug reporting instructions, please see: <http://www.gnu.org/software/libc/bugs.html>. developer@linux:~>
(Note: This example is on SLES 9. SLES 10 has deprecated support for Linux Threads and only supports NPTL)
https://www.novell.com/developer/ld_assume_kernel.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现