Ubuntu 20.04 WSL 1: UI Can't Run

Abstract: Resolve WSL 1 Qt5 shared library errors by migrating Ubuntu to WSL 2.

Created: 2026-09-21 by

The error occurs because WSL 1 lacks a full Linux kernel, preventing dynamic linker resolution of Qt5 shared libraries like libQt5Core.so.5. The definitive solution is to upgrade your distribution to WSL 2, which provides the necessary kernel support for native library loading and UI execution.

Understanding the Root Cause

The specific error message regarding libQt5Core.so.5 indicates that the system cannot locate or load a critical component of the Qt5 framework. While this might appear to be a missing package issue, the underlying cause is architectural. Windows Subsystem for Linux version 1 (WSL 1) operates by translating Linux system calls into Windows NT kernel calls. It does not run a real Linux kernel. Consequently, many complex shared objects, particularly those involving graphical interfaces or advanced memory management features required by modern Qt applications, fail to initialize correctly. When you attempt to run a UI tool compiled against Qt5, the dynamic linker (ld-linux-x86-64.so.2) searches for the required .so files. In WSL 1, even if the file exists on the filesystem, the translation layer often fails to map the dependencies correctly, resulting in the "No such file or directory" error despite the file being present. This is a known limitation of the older architecture. Upgrading to WSL 2 resolves this by introducing a lightweight virtual machine running a real Linux kernel, allowing standard Linux library resolution to function as expected. For users who have recently set up their environment, understanding where your installation resides is crucial before attempting any migration steps. You can verify your current setup by checking your installation location, as detailed in our guide on Ubuntu WSL Install Location: Where to Find It?. This ensures you are targeting the correct distribution instance during the export and reimport process.

Why Package Installation Fails

A common misconception is that reinstalling Qt packages will fix the issue. Running commands like sudo apt install qtbase5-dev or sudo apt-get install libqt5core5a will likely succeed without errors. However, the binary will still crash upon execution because the problem is not the absence of the file, but the inability of the WSL 1 environment to execute it properly. The dynamic linking process requires kernel-level interactions that WSL 1 simply does not support for these types of libraries. Therefore, software updates and dependency fixes are ineffective remedies for this specific symptom.

Step-by-Step Migration to WSL 2

To resolve the UI execution failure, you must migrate your Ubuntu 20.04 distribution from WSL 1 to WSL 2. This process involves exporting the current state of your Linux distro, deleting the old version, and importing it back with the new architecture. Follow these steps carefully to ensure no data is lost.
  1. Export the Distribution: Open PowerShell as Administrator on your Windows host. Use the following command to export your Ubuntu 20.04 instance to a tar archive. Replace Ubuntu-20.04 with the actual name of your distribution if it differs.
wsl --export Ubuntu-20.04 C:\wsl-backup\ubuntu2004.tar

This creates a backup file at the specified path. Ensure you have sufficient disk space for this operation, as it copies all your installed packages and user data.

  1. Unregister the Old Instance: Once the export is complete, unregister the existing WSL 1 instance. This removes the old configuration but keeps your exported tar file safe.
wsl --unregister Ubuntu-20.04

You may receive a confirmation prompt; confirm the action. Your previous Ubuntu installation will no longer appear in the list of running distributions.

  1. Import as WSL 2: Now, import the tar file back into WSL, explicitly specifying version 2. This step converts the architecture.
wsl --install -d Ubuntu-20.04 --version 2

If the automatic install command fails due to network issues or other constraints, you can use the generic import command:

wsl --import Ubuntu-20.04 C:\WSL\Ubuntu2004 C:\wsl-backup\ubuntu2004.tar --version 2

This command places the root filesystem in C:\WSL\Ubuntu2004 and loads the data from your backup. The --version 2 flag is critical; omitting it defaults to WSL 1.

  1. Verify the Upgrade: Launch your terminal and check the version.
wsl -l -v

Your Ubuntu 20.04 entry should now show VERSION 2. You can now launch your UI tools, and the libQt5Core.so.5 error should be resolved.

Alternative Considerations

If migrating to WSL 2 is not immediately possible due to hardware limitations or specific enterprise policies requiring WSL 1, you may need to reconsider your development environment. For instance, if you are working with heavy data processing or require cross-machine consistency, some users explore transferring their WSL Ubuntu installation to USB drives for portability, though this also benefits significantly from WSL 2 capabilities as discussed in Can I Transfer My WSL Ubuntu Installation to a USB and Run It from There?. Another alternative is to use a remote desktop protocol. Instead of trying to run GUI apps directly in WSL, you can install a VNC server or RDP service on the Linux side and connect from Windows. This bypasses the local library loading issue entirely by rendering the display over the network. However, this introduces latency and is generally less performant than native WSL 2 integration. It is also worth noting that if you are using newer hardware, such as Windows 11, cloning your distro is a straightforward way to test environments safely. As outlined in Clone WSL Distro: Installing Ubuntu on WSL2 in Windows 11, creating clones allows you to experiment with different configurations without risking your primary workspace. This practice is highly recommended when performing major architectural changes like the WSL 1 to WSL 2 migration described above.

Frequently Asked Questions

Can I fix the Qt5 error by installing libqt5core5a manually?

No, installing the package will not solve the problem in WSL 1. The error stems from the lack of a real Linux kernel, not missing files. Even if the library is present, the WSL 1 translation layer cannot execute it correctly. You must upgrade to WSL 2 to enable proper dynamic linking.

Does upgrading to WSL 2 affect my existing files and settings?

Your files and settings are preserved if you follow the export-import method correctly. By using wsl --export before unregistering, you create a complete snapshot of your environment. When you import it back with --version 2, all your user accounts, installed packages, and configurations are restored exactly as they were.

Is WSL 2 supported on all versions of Windows?

WSL 2 requires Windows 10 version 1903 or higher, or Windows 11. If you are on an older version of Windows 10, you may need to update your OS first. Additionally, certain older hardware without virtualization support enabled in the BIOS cannot run WSL 2. Check your system specifications to ensure compatibility before proceeding with the migration.

What if I cannot upgrade to WSL 2 due to work restrictions?

If organizational policies prevent WSL 2 usage, consider running your GUI applications on a separate virtual machine or cloud-based Linux instance. You can then access the interface via Remote Desktop Protocol (RDP) or VNC. This approach isolates the GUI requirements from your WSL 1 development environment, avoiding the library loading conflicts entirely.

How do I verify that my WSL instance is actually running version 2?

Open a Command Prompt or PowerShell window and type wsl -l -v. Look for your Ubuntu distribution in the list. The column labeled "VERSION" should display "2". If it shows "1", the migration was not successful, and you should repeat the unregister and import steps carefully.
Tags: Linux Ubuntu WSL Qt UI

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More