首页 > 系统相关 >CentOS yum 段错误 (core dumped)解决方法

CentOS yum 段错误 (core dumped)解决方法

时间:2022-08-31 21:36:46浏览次数:113  
标签:core 00 lee CentOS 代码 dumped yum usr root

CentOS yum 段错误 (core dumped)解决方法_RedHat/Centos_操作系统_脚本之家  https://www.jb51.net/os/RedHat/208481.html

今天在yum install 或者yum update的时候都提示段错误(core dumped),然后终止运行了。

复制代码 代码如下:
[root@lee ~]# yum -y update
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
* base: mirror.esocc.com
* extras: mirror.esocc.com
* soluslabs: mirror.us1.soluslabs.net
* updates: mirror.esocc.com
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 00:14
extras | 3.4 kB 00:00
extras/primary_db | 18 kB 00:00
soluslabs | 951 B 00:00
soluslabs/primary | 11 kB 00:00
段错误 (core dumped)
到谷歌上找各种大虾的文章还是无济于事,只好认真查看错误!首先我确定了不是因为Python版本的原因,因为之前安装了一个Python2.7.4。

复制代码 代码如下:
# vim /usr/bin/yum
查看第一行

复制代码 代码如下:
#!/usr/bin/python2.6
import sys
try:
import yum
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

%s

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
%s

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq

""" % (sys.exc_value, sys.version)
sys.exit(1)

sys.path.insert(0, '/usr/share/yum-cli')
try:
import yummain
yummain.user_main(sys.argv[1:], exit_code=True)
except KeyboardInterrupt, e:
print >> sys.stderr, "\n\nExiting on user cancel."
sys.exit(1)
第一行是

复制代码 代码如下:
#!/usr/bin/python2.6
直接看这个Python2.6是不是有问题

复制代码 代码如下:
[root@lee ~]# /usr/bin/python2.6 -V
Python 2.6.6
正确识别版本号,没问题。在yum clean all 以后都无济于事的时候,我突然想到会不会/etc/yum.repos.d/目录下多了东西?

复制代码 代码如下:
[root@lee ~]# ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo soluslabs.repo
发现里边有一个soluslabs.repo跟我yum命令报错的地方都是一个资源库,看来问题就在这了。

复制代码 代码如下:
soluslabs | 951 B 00:00
soluslabs/primary | 11 kB 00:00
段错误 (core dumped)
段错误的上一行是soluslabs,于是我直接rm它

自媒体培训



复制代码 代码如下:
# rm -f /etc/yum.repos.d/soluslabs.repo
然后再clean下

复制代码 代码如下:
# yum clean all
好滴,我们再回到熟悉的yum update

复制代码 代码如下:
[root@lee ~]# yum -y update
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 00:20
extras | 3.4 kB 00:00
extras/primary_db | 18 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.9 MB 00:13
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package bash.x86_64 0:4.1.2-14.el6 will be updated
---> Package bash.x86_64 0:4.1.2-15.el6_4 will be an update
---> Package bind-libs.x86_64 32:9.8.2-0.17.rc1.el6_4.4 will be updated
搞定,收工!

 

另一个解决方法:

使用yum命令安装东西或者yum update时都提示以下错误:

复制代码 代码如下:
[root@lee ~]# yum update
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* soluslabs: mirror.eu1.soluslabs.net
* updates: mirrors.tuna.tsinghua.edu.cn
段错误 (core dumped)
解决方法:

复制代码 代码如下:
[root@lee ~]# rpm -q zlib zlib-devel
zlib-1.2.3-29.el6.x86_64
zlib-devel-1.2.3-29.el6.x86_64
[root@lee ~]# cp /usr/lib64/lib
Display all 1910 possibilities? (y or n)
[root@lee ~]# cp /usr/lib64/libz.so /usr/local/lib64/
[root@lee ~]# cd /usr/local/lib64/
[root@lee lib64]# ln -sf libz.so libz.so.1
[root@lee lib64]# yum clean all
我的系统是CentOS 64位,如果是32位的在赋值libz.so时这么复制

复制代码 代码如下:
[root@lee ~] cp /usr/lib/libz.so /usr/local/lib/
然后重新yum update就可以了

标签:core,00,lee,CentOS,代码,dumped,yum,usr,root
From: https://www.cnblogs.com/jmbt/p/16644559.html

相关文章

  • CentOS设置默认启动命令行(不启动图形界面)
    CentOS设置默认启动命令行(不启动图形界面)-java_zhao-博客园 https://www.cnblogs.com/java-xz/p/7351867.htmlCentOS中如何进入图形界面和文字界面,Linux真正的服......
  • [CentOS8]Repository extras is listed more than once in the configuration
    1.问题[root@localhost~]#yuminstallhttps://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpmRepositoryextrasislistedmorethanonceintheconfigu......
  • centos加固脚本
    #!/bin/bash#Author:#Date:2018-10-11#Function:对账户的密码的一些加固read-p"设置密码最多可多少天不修改:"Aread-p"设置密码修改之间最小的天数:"Bread-p"......
  • CentOS 下 docker POSIX改中文
    cannotchangelocale(zh_CN.UTF-8):NosuchfileordirectoryCentOS下docker容器默认字符集为POSIX如果需要默认情况下查看字符集如下,可修改POSIX为 zh_CN.UTF-8......
  • CentOS 7上装Tesseract-OCR最新版本(5.0)
    通过编译代码形式在服务器上安装Tesseract-OCR最新版了安装基本的CentOS依赖项yuminstallautoconfautomakelibtoolpkgconfig.x86_64libpng12-devel.x86_64libjpe......
  • .net core上传https的post接口
    如果采用之前的HttpWebRequest方法是实现https的请求,会报错无法建立SSL连接换一种读取方式参考地址1,https://blog.csdn.net/shanghaibao123/article/details/124116749......
  • 如何在VMware上安装Linux系统(CentOS 7)
    1.创建新的虚拟机 2.选择安装类型(推荐典型) 3.选择稍后安装操作系统 4.选择操作系统(linux)及版本(CentOS) 5.虚拟机的名称以及虚拟机的存储位置(建议不要有中......
  • Centos7.9离线安装ORACLE19C
    一、基础环境配置1、关闭系统防火墙systemctlstopfirewalldsystemctldisablefirewalld2、关闭selinuxvim/etc/selinux/configSELINUX=disabled3、准备安装......
  • Linux centos7 删除多余内核
    Linux下可能会存在有多个内核的情况,通过某一内核启动会出现无法登录的情况,这时我们就要选择可以正常登录的内核,成功进入系统后,将多余的内核删除。检查系统中的内核 ......
  • Centos7 安装zookeeper
    1.cd/usr/share,创建zookeeper文件夹2.进入zookeeper3.下载zookeeperwgethttps://archive.apache.org/dist/zookeeper/zookeeper-3.5.9/apache-zookeeper-3.5.9-b......