yum安装报错

前端之家收集整理的这篇文章主要介绍了yum安装报错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

http://yum.baseurl.org/wiki/Faq

yum install tcl –y
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.7.8 (default,Jan  3 2018,20:47:59) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]

If you cannot solve this problem yourself,please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

[root@bogon redis-3.0.2]# 
[root@bogon redis-3.0.2]# which yum/usr/bin/yum
/usr/bin/which: no yum in (./yum/usr/bin)
[root@bogon redis-3.0.2]# 
[root@bogon redis-3.0.2]# 
[root@bogon redis-3.0.2]# vi /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,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

修改成功后:
修改 :#!/usr/bin/python2.6 具体python路径

再次安装成功:

[root@bogon redis-3.0.2]# yum install tcl –y   
Loaded plugins: fastestmirror,refresh-packagekit,security
Determining fastest mirrors
epel/Metalink                                                                                                                                       | 7.8 kB     00:00     
 * base: mirrors.aliyun.com
 * epel: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                                | 3.7 kB     00:00     
base/primary_db                                                                                                                                     | 3.7 MB     00:13     
epel                                                                                                                                                | 3.2 kB     00:00     
epel/primary                                                                                                                                        | 2.9 MB     00:08     
epel                                                                                                                                                           10197/10197
extras                                                                                                                                              | 3.3 kB     00:00     
https://repos.influxdata.com/rhel/6/i386/stable/repodata/repomd.xml: [Errno 14] problem making ssl connection
Trying other mirror.
Error: Cannot retrieve repository Metadata (repomd.xml) for repository: influxdb. Please verify its path and try again
[root@bogon redis-3.0.2]#

猜你在找的Bash相关文章