This issue seems to be caused by insufficient memory on the Raspberry Pi. Please follow the steps below to set up swap memory using dphys-swapfile and try again:
Steps to Set Up Swap Memory
Install dphys-swapfile
Install the required package using the following command:
sudo apt update
sudo apt install dphys-swapfile
Configure Swap File Size
Open the configuration file to set the swap file size:
sudo nano /etc/dphys-swapfile
Modify the CONF_SWAPSIZE parameter to the desired size (in MB).
CONF_SWAPSIZE=2048
Apply the Changes and Enable Swap
Apply the new settings and activate the swap file: