由于yum 命令是依赖 python的,系统原自带的版本为2.4, 最近在学python 将版本升级到2.7后,发现yum 不可用了。 [oracle@cnode1 ~]$ 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: 解决方法:修改yum文件的版本,由于yum 命令是个python 程序, 改成python2.4 的环境变量就可以。 #vim /usr/bin/yum 将 #!/usr/bin/python 修改为 #!/usr/bin/python2.4 再次执行yum正常。 顺便P一下红帽,改升升级的就升升级了,别落后 |
没有评论:
发表评论