Getting "AttributeError: 'module' object has no attribute 'Cmd'" when using yum
Issue
Getting following traceback when using yum :-
# yum update
Traceback (most recent call last):
File "/usr/bin/yum", line 28, in <module>
import yummain
File "/usr/share/yum-cli/yummain.py", line 34, in <module>
import cli
File "/usr/share/yum-cli/cli.py", line 34, in <module>
import shell
File "/usr/share/yum-cli/shell.py", line 31, in <module>
class YumShell(cmd.Cmd):
AttributeError: 'module' object has no attribute 'Cmd'
Environment
- Red Hat Enterprise Linux7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
