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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In