国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > CentOS > 正文

CentOS yum 段錯誤 (core dumped)解決方法

2020-06-21 13:07:39
字體:
來源:轉載
供稿:網友

今天在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就可以了

 


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 镇赉县| 平定县| 沙湾县| 宁化县| 扶余县| 桃江县| 巴彦淖尔市| 车致| 南川市| 老河口市| 阳泉市| 北票市| 巴塘县| 武川县| 通州市| 长寿区| 得荣县| 顺昌县| 宿松县| 台中市| 乌兰县| 壤塘县| 桃源县| 舟山市| 鸡泽县| 遂昌县| 鹤山市| 县级市| 寿光市| 若羌县| 宜良县| 黄平县| 罗甸县| 罗定市| 大新县| 鄂州市| 寻甸| 嘉峪关市| 嘉禾县| 常宁市| 侯马市|