Retrying while ignoring an error will lead to corrupted package installations. Save a few of those downloaded files until you have a combination of a .pkg file with a good and a bad checksum. Then compare those files withit fails while installing but if I retry it finally works
diff good-file bad-file. If the files differ the download went wrong. If identical, then calculation of the checksum went wrong. Probably because of a CPU/RAM problem, as pointed out here before..
# pkg install --quiet --yes kde5 plasma5-sddm-kcm sddm
pkg: py39-numpy-1.22.4_1,1 failed checksum from repository
Burn the memtest86-usb.img image to a stick and boot from it.I have installed memtest86 but I do not know how to run it.
pkg info -D memtest86
Usage: USB: 1) Insert memstick 2) dd if=/usr/local/share/memtest86/memtest86-usb.img \ of=/dev/daN bs=1m conv=sync 3) Boot the memstick CD-ROM: 1) Insert blank cd-rom 2) cdrecord dev=<device> /usr/local/share/memtest86/memtest86-cdrom.iso 3) Boot the memstick FLOPPY: 1) Insert blank floppy 2) dd if=/usr/local/share/memtest86/memtest86-floppy.img of=/dev/fd0 3) Boot the floppy