CentOS yum prompt segment error (core dumped) solution

Source: Internet
Author: User

The system prompts a segment error (core dumped) during yum install or yum update today, and then stops running.

The code is as follows: Copy code

[Root @ lee ~] # Yum-y update
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
* Base: pai.esocc.com
* Extras: pai.esocc.com
* Soluslabs: pai.us1.soluslabs.net
* Updates: 2.16.esocc.com
Base | 3.7 kB
Base/primary_db | 4.4 MB
Extras | 3.4 kB: 00
Extras/primary_db | 18 kB: 00
Soluslabs | 951 B
Soluslabs/primary | 11 kB: 00
Segment error (core dumped)

Searching for various prawn articles on Google does not help, so you have to check the errors carefully! First, I confirmed that it was not because of the Python version, because a Python2.7.4 was installed.

The code is as follows: Copy code

# Vim/usr/bin/yum

#! /Usr/bin/python2.6
Import sys
Try:
Import yum
Failed T 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
Current version of Python, which is:
% S
 
If you cannot solve this problem yourself, please go
The yum faq:
Http://yum.baseurl.org/wiki/Faq
   
"% (Sys. exc_value, sys. version)
Sys. exit (1)
 
Sys. path. insert (0, '/usr/share/yum-cl ')
Try:
Import yummain
Yummain. user_main (sys. argv [1:], exit_code = True)
Except t KeyboardInterrupt, e:
Print> sys. stderr, "nnExiting on user cancel ."
Sys. exit (1)

The first line is

The code is as follows: Copy code

#! /Usr/bin/python2.6

Check whether this Python2.6 is correct.

The code is as follows: Copy code

[Root @ lee ~] #/Usr/bin/python2.6-V
Python 2.6.6

Correct version number recognition. No problem. When yum clean all was useless, I suddenly thought that there would be more things in the/etc/yum. repos. d/directory?

The code is as follows: Copy code

[Root @ lee ~] # Ls/etc/yum. repos. d/
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo soluslabs. repo

I found that there was a soluslabs. repo and the error reported by my yum command was a resource library. It seems that the problem was the same.

Soluslabs | 951 B
Soluslabs/primary | 11 kB: 00
Segment error (core dumped)

The last line of the error section is soluslabs, so I directly rm it

The code is as follows: Copy code

1 # rm-f/etc/yum. repos. d/soluslabs. repo

And then run clean.

The code is as follows: Copy code

1 # yum clean all

[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
Base/primary_db | 4.4 MB
Extras | 3.4 kB: 00
Extras/primary_db | 18 kB: 00
Updates | 3.4 kB: 00
Updates/primary_db | 3.9 MB
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package bash. x86_64. 1.2-14. el6 will be updated
---> Package bash. x86_64. 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

Let's get back to the familiar yum update.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.