环境描述
出问题的环境信息
OS版本:BCLinux for Euler 21.10 (LTS-SP2)
DB版本:panweidb2.0.2
问题描述
1、升级磐维2.0.1到磐维2.0.2之后,执行yum报错:
[root@panweidb2 ~]# yum list
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to[:<exec_prefix>]
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named ‘encodings’Current thread 0x000014c57555b740 (most recent call first):
Aborted (core dumped)
问题分析
1、该报错显示执行yum源时找不到python的模块和编码
分析结论
1、有环境变量和原来的python相关变量有冲突导致python找不到相关执行路径
解决方法
1、注释~/.bashrc文件中因升级自动写进的环境变量即可
2、vi ~/.bashrc
3、source ~/.bashrc
最后修改时间:2025-09-30 00:43:02
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




