博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
yum安装报错
阅读量:5775 次
发布时间:2019-06-18

本文共 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

你可能感兴趣的文章
嵌入式Linux学习基础规划篇
查看>>
SAP上阿里云白皮书-第四章 SAP上阿里云规划
查看>>
第7章 使用Keras开发神经网络
查看>>
Linux上的TIME_WAIT和tcp_fin_timeout
查看>>
回顾工作经历,工业“大数据”是发展的必然吗?
查看>>
大二上册生活总结
查看>>
开发手记(一)准备新的征途
查看>>
OS X Keyboard Shortcuts
查看>>
Mutual information and Normalized Mutual information 互信息和标准化互信息
查看>>
python用作监控
查看>>
Centos 升级python2.7到python3.4.2
查看>>
布局小窍门之----让头部和主干内容居中
查看>>
日志分析代码实现(正则表达式)
查看>>
Linux RH5平台下使用Oracle ASM创建数据库
查看>>
js closure ,copy from stackoverflow
查看>>
小型企业局域网免费上网行为管理方案
查看>>
linux PATH变量
查看>>
LoadRunner编程之文件的操作
查看>>
redis报错
查看>>
unit 4
查看>>