CentOS在执行yum操作相关,可能会遇到如下错误:
Traceback (most recent call last):
File "/usr/share/createrepo/genpkgmetadata.py", line 28, in <module>
import createrepo
ImportError: No module named createrepo
出现该错误的主要原因,应该是系统升级Python版本,但是yum脚本使用的是老版本python,所以,编辑文件:/usr/share/createrepo/genpkgmetadata.py,将顶部内容:
#!/usr/bin/python -t
改为:
#!/usr/bin/python2.6.6 -t
这样就解决问题了。
文章的脚注信息由WordPress的wp-posturl插件自动生成
微信扫一扫,打赏作者吧~![[已解决]nc命令报错 close: Bad file descriptor](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2022/03/Snipaste_2022-03-18_20-16-48.png&w=280&h=210&zc=1)
![[已解决]SecureCRT/SSH 连接Linux缓慢](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2020/07/ssh_slow.jpg&w=280&h=210&zc=1)
![[转载]Linux的tickless设置](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.litrin.net/wp-content/uploads/2018/11/kernel_menuconfig_tickless-1.png&w=280&h=210&zc=1)
![[整理]鲲鹏性能优化十板斧(五)——应用程序性能调优<TaiShan特战队出品>](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2020/03/1-4.jpg&w=280&h=210&zc=1)