How to solve centos yum segfault problem

藏色散人
Release: 2022-01-11 14:22:03
Original
3340 people have browsed it

Centos yum segfault solution: 1. Execute the "# rm -f /etc/yum.repos.d/soluslabs.repo" command; 2. Re-run yum update.

How to solve centos yum segfault problem

The operating environment of this article: CentOS 7 system, python2.6, Dell G3 computer.

How to solve centos yum segfault problem?

CentOS yum segmentation fault (core dumped) solution

Today, when yum install or yum update, a segmentation fault (core dumped) is prompted, and then Termination of operation.

The code is as follows:

[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)
Copy after login

Looking for articles about various prawns on Google still doesn’t help, so I have to check the errors carefully! First of all, I determined that it was not due to the Python version, because Python 2.7.4 was installed before.

The code is as follows:

# vim /usr/bin/yum
Copy after login

View the first line

The code is as follows:

#!/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)
Copy after login

The first line is

The code is as follows:

#!/usr/bin/python2.6
Copy after login

Check directly to see if there is a problem with Python2.6

The code is as follows:

[root@lee ~]# /usr/bin/python2.6 -V
Python 2.6.6
Copy after login

Correctly identify the version number, no problem. When yum clean all didn't help, I suddenly thought that there might be more things in the /etc/yum.repos.d/ directory?

The code is as follows:

[root@lee ~]# ls  /etc/yum.repos.d/
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo  CentOS-Vault.repo  soluslabs.repo
Copy after login

I found that there is a soluslabs.repo in it, and the place where I reported errors with the yum command is a resource library. It seems that the problem lies here.

The code is as follows:

soluslabs                                    |  951 B     00:00     
soluslabs/primary                    |  11 kB     00:00     
段错误 (core dumped)
Copy after login

The previous line of the segfault is soluslabs, so I directly rm it

The code is as follows:

# rm -f /etc/yum.repos.d/soluslabs.repo
Copy after login

Then again Clean

The code is as follows:

# yum clean all
Copy after login

Okay, let’s go back to the familiar yum update

The code is as follows:

[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          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
Copy after login

Done, call it a day!

Another solution:

When using the yum command to install something or yum update, the following error is prompted:

The code is as follows:

[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)
Copy after login

Solution:

The code is as follows:

[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
Copy after login

My system is CentOS 64-bit. If it is 32-bit, copy it like this when assigning libz.so

The code is as follows:

[root@lee ~] cp /usr/lib/libz.so /usr/local/lib/
Copy after login

Then re-yum update.

Recommended tutorial: "centos tutorial"

The above is the detailed content of How to solve centos yum segfault problem. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!