others-how to solve the syntax error when doing yum update?
1. Purpose
In this post, I will show you how to solve the syntax error
when doing yum update
.
Because upgrading python3 deleted the original python2, I am trying to update the yum repo:
[root@localhost Python-3.11.5]# yum update
File "/usr/bin/yum", line 30
except KeyboardInterrupt, e:
^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
Current python version:
[root@localhost Python-3.11.5]# python --version
Python 3.11.5
2. Solution
Here is the solution, you can just remove the python2 using rpm:
rpm -ivh python2.rpm
3. Summary
In this post, I demonstrated how to solve the Syntax error
when trying to do the yum update
. That’s it, thanks for your reading.