[Solved] never ending lxml build raspberry pi 3, usb stick swap
if you have docker never ending lxml build for raspberry pi, you need to increase swap space. raspberry pi's default 100m is not enough for this. I had to make it with raspi overclock and usb stick 2gb swap space allocation, even with this setup 1gb memory and almost 350m swap usage it takes a lot of time to build lxml, be patient
#result
sudo dphys-swapfile swapon
#result
Created wheel for websockets: filename=websockets-8.1-cp37-cp37m-linux_armv7l.whl size=78100 sha256=790eb0ccb81f08ae48e1d1930f2a2e8c2e2e846a01d7fe8bb1cb282cd8e5025f
Stored in directory: /root/.cache/pip/wheels/74/54/40/797b9f77057c12b05b85edbf63465cbe4c24f53d301de1432b
Building wheel for lxml (setup.py): started
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): still running...
Building wheel for lxml (setup.py): finished with status 'done'
Created wheel for lxml: filename=lxml-4.4.1-cp37-cp37m-linux_armv7l.whl size=6273585 sha256=df03cf857c0cdcfa1f9833150387f5b8426320094472cf8565f9ef7c421276db
Stored in directory: /root/.cache/pip/wheels/19/96/46/e4e538ebbe7496324a669bb244156a0b7d8796266d8bc1b6ce
Building wheel for websockets (setup.py): started
Building wheel for websockets (setup.py): finished with status 'done'
-- solution ---
#create 2gb partition on usb
fdisk /dev/sda1
# make filesystem
sudo mkfs.ext4 -L USBSWAP /dev/sda1# make filesystem
#mount usb to /mnt
root@raspberrypi3:/ cat /etc/fstab
proc /proc proc defaults 0 0
PARTUUID=610c3b14-01 /boot vfat defaults 0 2
PARTUUID=610c3b14-02 / ext4 defaults,noatime 0 1
UUID=YOUR_USB_UUID /mnt ext4 defaults,noatime 0 1
#find your usb uuid
#find your usb uuid
blkid -o export /dev/sda1 | grep ^UUID
# edit these values to make swap 2gb
sudo vi /etc/dphys-swapfile
CONF_SWAPFILE=/mnt/swap
CONF_SWAPSIZE=2048
#setup and enable swap
sudo dphys-swapfile setupsudo dphys-swapfile swapon
Comments