Execution of any dnf or yum specific commands are failing with error "bad magic number in 'six' " in RHEL 8

Solution Verified - Updated -

Issue

  • While executing any dnf or yum specific command e.g dnf repolist , the following errors are observed:

    # dnf repolist
    Failed loading plugin "changelog": bad magic number in 'six': b'\x03\xf3\r\n'
    Failed loading plugin "product-id": bad magic number in 'six': b'\x03\xf3\r\n'
    Failed loading plugin "subscription-manager": bad magic number in 'six': b'\x03\xf3\r\n'
    Failed loading plugin "upload-profile": bad magic number in 'six': b'\x03\xf3\r\n'
    Failed loading plugin "spacewalk": bad magic number in 'six': b'\x03\xf3\r\n'
    ...
    

Environment

Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content