rpm, yum, dnf issues under unsupported Windows Subsystem for Linux (WSL)

Solution In Progress - Updated -


  • After an RPM database rebuild, like rpm --rebuilddb, commands like rpm & yum fail and/or hang.
  • RHEL 8 (and Fedora) systems have following errors with dnf immediately.

    [root@win10 Temp]# dnf list
    Failed to set locale, defaulting to C
    error: db5 error(12) from dbenv->open: Cannot allocate memory
    error: db5 error(22) from dbenv->close: Invalid argument
    error: cannot open Packages index using db5 - Cannot allocate memory (12)
    error: cannot open Packages database in /var/lib/rpm
    Error: Error: rpmdb open failed


  • Red Hat Enterprise Linux (RHEL) 7
  • Red Hat Enterprise Linux (RHEL) 8
  • Microsoft Windows Subsystem for Linux (WSL)
  • Whitewater Foundry, WLinux Enterprise (WLE)

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