Use the yum command prompt “except keyboardinterrupt, e: syntax error: invalid syntax”
Troubleshooting of error reporting using Yum command
Error reporting using Yum command
File "/usr/bin/yum", line 30
except KeyboardInterrupt, e:
^
SyntaxError: invalid syntax
Reason for the problem:
Yum package management uses python2 X, python2 X to Python 3.0 After X, problems occurred due to Python version syntax compatibility
Solution:
Modify the yum configuration file to point the python version to the previous version
vi /usr/bin/yum
#!/usr/bin/python2.7
Modify the urlgrabber ext down file and change the python version
vi /usr/libexec/urlgrabber-ext-down
#!/usr/bin/python2.7
Read More:
- [Solved] Except CvBridgeError,e:SyntaxError:invalid syntax
- [Solved] sys.stderr.write(f“ERROR: {exc}“) SyntaxError: invalid syntax
- [Solved] ubuntu Run jupyter Error: print(‘Error in generated code:‘, file=sys.stderr) SyntaxError: invalid syntax
- [Solved] Yum Install Software Error: Invalid configuration value: failovermethod=priority…
- Shell Script syntax error near unexpected token `done’
- [Solved] Syntax Error: TypeError: Cannot read property ‘parseComponent‘ of undefined (vue报错)
- Ubuntu shell Script syntax error near unexpected token `$‘{\r‘‘
- [Solved] Ubuntu Server 18.4 System /etc/sudoers: syntax error near line 32
- [Solved] yum Command Error: Error: Failed to download metadata for repo ‘appstream‘
- Git Syntax Error: TypeError: this.getOptions is not a function [How to Solve]
- [Solved] bash: /etc/vimrc: line 15: syntax error near unexpected token `“autocmd“‘
- [Solved] shell Error: Syntax error: “(“ unexpected (expecting “}“)
- [Solved] Bash: Syntax error: redirection unexpected
- Running shell script reports an error: “syntax error near unexpected token solution ‘”
- [Solved] Error detected while processing /root/.vimrc: E492: Not an editor command: Plug ‘scrooloose/nerdtree’
- [Solved] Shell error: syntax error: unexpected end of file
- [Solved] Linux executes SQL script Error: Syntax error
- [Solved] Fluent error: invalid command [initialize-flow
- VMware: vmw_ ioctl_ Command error invalid parameter [How to Solve]
- [Solved] Linux shell Script Error: syntax error near unexpected token `do