How to Fix: Wget error bash Windows Subsystem for Linux
Wget error in WSL on Windows Subsystem for Linux
📋 Table of Contents
The error 'Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.' is seen in Wget while trying to download using wget on Windows Subsystem for Linux (WSL). This issue primarily affects users who have recently installed or updated their WSL environment.
This frustrating error can hinder the ability to download files efficiently, especially when using wget. In this guide, we will outline the root causes of this issue and provide step-by-step solutions to resolve it.
💡 Why You Are Getting This Error
- The primary reason for this error is that the HSTS database must be a regular and non-world-writable file. The wget-hsts store at '/home/atul/.wget-hsts' is world writable, which prevents wget from accessing it.
- An alternative reason could be related to the version of WSL or Windows 10 Pro Version changes. However, this is less likely to be the cause in your scenario since you mentioned a fresh reinstall.
🛠️ Step-by-Step Verified Fixes
Update wget-hsts store to make it non-world-writable
- Step 1: Open a terminal in WSL and navigate to the '/home/atul/.wget-hsts' directory using the 'cd' command.
- Step 2: Run the 'chmod 600 .wget-hsts' command to set the permissions of the file to read-only for the owner.
- Step 3: Try running wget again to see if the error persists.
Check WSL and Windows 10 Pro Version compatibility
- Step 1: Open a terminal in WSL and run the 'wget --version' command to check the current version of wget.
- Step 2: Compare the version of wget installed on your system with the one available on the official website. If there's an update, download and install it using the package manager (e.g., apt-get or yum).
- Step 3: Try running wget again to see if the error persists.
🎯 Final Words
To resolve the 'Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.' error in Wget while using Windows Subsystem for Linux, try updating the wget-hsts store or checking for compatibility issues between WSL and Windows 10 Pro Version changes.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Fix Pc crashes shortly after launching game (rainbow six siege). Compl
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: New PC build- no signal and no clue
Fix New PC build- no signal and no clue. Complete troubleshooting guid