yum指令之修復

2022-04-18 11:21:14 字數 888 閱讀 5585

折騰著搞 openvpn **伺服器 yum指令 出了點問題

[root@cloud ~]# yum

there was a problem importing one of the python modules

required to run yum. the error leading to this problem was:

no module named yum

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:

2.6.6 (r266:84292, feb 22 2013, 00:00:18)

[gcc 4.4.7 20120313 (red hat 4.4.7-3)]

原因:

根據報錯資訊提示,yum 會用到 python 的某些模組。當前模組安裝錯誤 或者 python 版本錯誤

當前錯誤是 python 版本錯誤

解決:

1. 檢視yum版本 rpm -qa |grep yum

檢視python版本 whereis python

發現 python果然安裝了兩個版本2.6和2.7版本

2. 編輯 yum 使用的 python 版本

vi /usr/bin/yum

把#!/usr/bin/python改為#!/usr/bin/python2.6

yum 常用指令

一些常用命令 安裝軟體,x處是軟體的名字 yum install x 刪除軟體,x處是軟體的名字 yum remove x或 刪除軟體,x處是軟體的名字 yum erase x 公升級軟體,x處是軟體的名字 yum upgrade x或者 公升級軟體,x處是軟體的名字 yum update x 查詢...

yum常用指令

yum可以幫助我們方便的管理rpm包,什麼是rpm呢?rpm red hat package management,red hat軟體包管理 提供了一種構架,在這種架構下,可以在red hat enterprise linux fedora project suse linux enterprise...

centos 中yum錯誤修復

剛剛裝了centos6.5要用yum安裝東西結果發現yum不能解析網域名稱 具錯誤體如下 loaded plugins fastestmirror,refresh packagekit,security loading mirror speeds from cached hostfile could...