本文共 3294 字,大约阅读时间需要 10 分钟。
yum install tcl –yThere was a problem importing one of the Python modulesrequired to run yum. The error leading to this problem was: No module named yumPlease install a package which provides this module, orverify that the module is installed correctly.It's possible that the above module doesn't match thecurrent 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 systry: import yumexcept ImportError: print >> sys.stderr, """\There was a problem importing one of the Python modulesrequired to run yum. The error leading to this problem was: %sPlease install a package which provides this module, orverify that the module is installed correctly.It's possible that the above module doesn't match thecurrent version of Python, which is:%sIf you cannot solve this problem yourself, please go tothe 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, securityDetermining fastest mirrorsepel/metalink | 7.8 kB 00:00 * base: mirrors.aliyun.com * epel: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.combase | 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/10197extras | 3.3 kB 00:00 https://repos.influxdata.com/rhel/6/i386/stable/repodata/repomd.xml: [Errno 14] problem making ssl connectionTrying 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]#
转载于:https://blog.51cto.com/357712148/2153073