How To Fix: Failed to fork on WSL with Ubuntu



RECOMMENDED: Click here to fix Windows errors and optimize system performance

WSL (Windows Subsystem for Linux) is a compatibility layer used to run Linux binaries on Windows 10. The program was introduced in Windows 10 and Windows Server 2019 and has enabled many developers to easily use Linux-based executables on Windows. However, there have been many recent reports of an error “# apt-get update FATAL -> Failed to fork” when trying to update the Ubuntu system.

In general, this message indicates that the apt process is running out of disk space. The fact that Virtualmin has also failed is a good sign that the whole system is running out of steam. Most likely, the database collapsed. You can search for messages outside the memory in /var/log/syslog to confirm this.

Create a new swap file

It is possible that the space on the exchange file has expired, causing the error. Therefore, we will create a new exchange file in this step. For that:

  • Start Ubuntu.
  • Type the following command and press “Enter”.

sudo fallocate -1 4G /swapfile

  • The exchange file is now created, but must still be enabled.
  • To make the file more secure, type the following command and press Enter.

sudo chmod 600 /swapfile



February 2021 Update:

We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

download



  • Enter the following command to configure the swap space and press “Enter”.

sudo mkswap /swapfile

  • To activate the swap space, enter the following command and press “Enter”.

sudo swapon /swapfile

  • Check if the problem persists after executing these commands.

Disable Windows Defender Antivirus on Windows 10.

To temporarily disable the security function of your device, proceed as follows:

  1. Open Start.
  2. Search for Windows Security and click on the top result to open the experience.
  3. Click on Virus and Threat Protection.
  4. In the Virus and Threat Protection Settings section, click Manage Settings.
  5. Disable the Real-time protection option.

Once these steps are completed, the antivirus program disables real-time protection, allowing you to install applications or perform a specific task that you couldn’t do before because the security function blocked the action.

CONCLUSION

This is the most frequently requested function of the Windows subsystem. Interoperability between NT and Linux processes is a feature that allows users of the Windows for Linux subsystem to merge and match NT and Linux binaries from the same shell, all running natively on the NT kernel. We briefly discussed LxBus, the underlying IPC mechanism that allows communication between NT and WSL processes. With this knowledge, the authors then discussed the use of LxBus to allow the sharing of NT and VFS file objects between NT and WSL processes.

https://askubuntu.com/questions/1054464/fatal-failed-to-fork-on-windows-subsystem-for-linux-with-ubuntu



RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance