NSLU2-Linux
view · edit · print · history

This ipkg error can be caused by running out of memory, that isn't redily apparent from the error message.

The cure is to add a swap file, add more swap space file or kill running applications to free memory. I'd suggest killing applications as the easy path as they will be restarted at your next reboot. There are other sections here on creating and using a swap file (not a partition) and on using NFS to make swap space available.

root@NSLU2-1:/$ ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/slugosbe/cross/4.8-beta/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/slugosbe/cross/4.8-beta/Packages.gz
Updated list of available packages in /var/lib/ipkg/cross
Downloading http://ipkg.nslu2-linux.org/feeds/slugosbe/native/4.8-beta/Packages.gz
xsystem: ERROR: fork failed before execution: `wget --passive-ftp    -q -P /tmp/ipkg-7d7G0W http://ipkg.nslu2-linux.org/feeds/slugosbe/native/4.8-beta/Packages.gz'
An error ocurred, return value: 1.

My solution was to use some of the spare space on the flash drive I'm using as a temporary swap file. If you are not familiar with these commands read the other FAQ sections, the dd command can cause you major grief if used incorrectly!

Create the file (change to the directory where you want it created) to use for swap space:
dd if=/dev/zero of=swapfile bs=1M count=128

Format it as swap space:
mkswap swapfile

Add the swap space to your system:
swapon swapfile

Verify that it was added correctly:
cat /proc/meminfo 
Before swap added you'll see:

SwapTotal:           0 kB
SwapFree:            0 kB

After adding the swap space you'll see:

SwapTotal:      131064 kB
SwapFree:       131064 kB 

Once done you can remove the swap space with the swapoff command and delete the swapfile.

view · edit · print · history · Last edited by stanley_p_miller.
Originally by stanley_p_miller.
Page last modified on August 18, 2008, at 04:52 AM