千家信息网

LINUX在卸载elfutils-libelf导致rpm工具不可用该怎么办

发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,LINUX在卸载elfutils-libelf导致rpm工具不可用该怎么办,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。
千家信息网最后更新 2026年11月01日LINUX在卸载elfutils-libelf导致rpm工具不可用该怎么办

LINUX在卸载elfutils-libelf导致rpm工具不可用该怎么办,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

2021年4月24日,一新手练习mysql数据库安装其中有一步骤需要安装 elfutils-libelf-devel-0.164-2.el6.x86_64.rpm elfutils-libelf-0.164-2.el6.x86_64.rpm包,在安装过程中报错版本冲突:
[root@centos ~]# rpm -ivh elfutils-libelf-devel-0.164-2.el6.x86_64.rpm elfutils-libelf-0.164-2.el6.x86_64.rpm
Preparing... ########################################### [100%]
file /usr/lib64/libelf.so.1 from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
file /usr/share/locale/de/LC_MESSAGES/elfutils.mo from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
file /usr/share/locale/en@boldquot/LC_MESSAGES/elfutils.mo from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
file /usr/share/locale/en@quot/LC_MESSAGES/elfutils.mo from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
file /usr/share/locale/es/LC_MESSAGES/elfutils.mo from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
file /usr/share/locale/ja/LC_MESSAGES/elfutils.mo from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
file /usr/share/locale/pl/LC_MESSAGES/elfutils.mo from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
file /usr/share/locale/uk/LC_MESSAGES/elfutils.mo from install of elfutils-libelf-0.164-2.el6.x86_64 conflicts with file from package elfutils-libelf-0.152-1.el6.x86_64
[root@centos ~]#
然后他就卸载了本地低版本的elfutils-libelf:
[root@centos ~]# rpm -e --nodeps elfutils-libelf
接着,再执行 rpm -ivh elfutils-libelf-devel-0.164-2.el6.x86_64.rpm elfutils-libelf-0.164-2.el6.x86_64.rpm 报错:
[root@centos ~]# rpm -ivh elfutils-libelf-devel-0.164-2.el6.x86_64.rpm elfutils-libelf-0.164-2.el6.x86_64.rpm
rpm: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

这时,rpm已经被破坏缺失libelf.so.1而不能用。
要修复rpm包也很简单,从别的机器上赋值 libelf.so.1放在/usr/lib64/下(我是从rhel5的机器上复制过来的):

[root@centos ~]# cp libelf.so.1 /usr/lib64/
再执行rpm命令有如下输出表示rpm工具已经修复:
[root@centos ~]# rpm
RPM version 4.8.0
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL
Usage: rpm [-aKfgpWHqVcdilsKiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package] [-W|--ftswalk] [--pkgid] [--hdrid] [--fileid] [--specfile] [--triggeredby]
[--whatrequires] [--whatprovides] [--nomanifest] [-c|--configfiles] [-d|--docfiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT] [-s|--state]
[--nofiledigest] [--nomd5] [--nofiles] [--nodeps] [--noscript] [--comfollow] [--logical] [--nochdir] [--nostat] [--physical] [--seedot] [--xdev]
[--whiteout] [--addsign] [-K|--checksig] [--delsign] [--import] [--resign] [--nodigest] [--nosignature] [--initdb] [--rebuilddb] [--aid] [--allfiles]
[--allmatches] [--badreloc] [-e|--erase +] [--excludedocs] [--excludepath=] [--fileconflicts] [--force] [-F|--freshen +]
[-h|--hash] [--ignorearch] [--ignoreos] [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nofiledigest] [--nomd5] [--nocontexts] [--noorder]
[--nosuggest] [--noscripts] [--notriggers] [--oldpackage] [--percent] [--prefix=

] [--relocate==] [--replacefiles] [--replacepkgs]
[--test] [-U|--upgrade +] [--quiet] [-D|--define 'MACRO EXPR'] [-E|--eval 'EXPR'] [--macros=] [--nodigest] [--nosignature]
[--rcfile=] [-r|--root ROOT] [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version] [-?|--help] [--usage] [--scripts] [--setperms]
[--setugids] [--conflicts] [--obsoletes] [--provides] [--requires] [--info] [--changelog] [--xml] [--triggers] [--last] [--dupes] [--filesbypkg]
[--fileclass] [--filecolor] [--fscontext] [--fileprovide] [--filerequire] [--filecaps]
[root@centos ~]#
LINUX rpm -e --nodeps危险,一定要慎用,否则主机内核被破坏。

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注行业资讯频道,感谢您对的支持。

工具 机器 版本 帮助 怎么办 清楚 危险 中报 主机 内容 内核 命令 对此 数据 数据库 文章 新手 更多 步骤 知识 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 互联网科技图片 北京路客互联网科技有限公司 互联网科技活动banner 互联网科技公司税收优惠 有马互联网科技 南京欣网互联网科技 上海致骋互联网科技 广西互联网科技公司 山东吉时兔互联网科技有限公司 顶级互联网科技成果有哪些 重庆威客帮互联网科技 智腾互联网科技有限公司 美国互联网科技实力 互联网金融科技公司的优势 伍佰万互联网科技怎么赚钱 南京一网一红互联网科技有限公司 互联网科技创新创业项目 上海互联网科技园景观 六子台科技互联网展会 互联网 科技节活动 微视频大赛 华服互联网科技靠谱吗 山东特亿宝互联网科技有限公司 成都互联网科技公司 九亚互联网科技 南京欣网互联网科技 贵州叶脉互联网科技有限公司所属行业 移动互联网科技公司 健康食品互联网创新科技园项目 工业互联网科技创业 广州全民伙伴互联网科技有限公司
0