busybox.net has been unreliable. Source mirrors:
git clone https://git.busybox.net/busybox
# or
git clone https://github.com/mirror/busybox# debian/ubuntu
sudo apt install build-essential libncurses-dev pkg-config
# alpine
apk add build-base ncurses-dev
# arch
pacman -S base-devel ncursesGCC 14 (Debian trixie, Ubuntu 24.04+, Fedora 40+) promotes -Wimplicit-int
from warning to error. Busybox's ncurses check script has main() {} instead
of int main() {}, so make menuconfig fails with a misleading
"Unable to find the ncurses libraries" even though the libraries are installed
and pkg-config resolves fine.
Fix:
sed -i 's/main() {}/int main() {}/' scripts/kconfig/lxdialog/check-lxdialog.shOr if you want to be thorough:
sed -i \
-e 's/main() {}/int main() {}/' \
-e 's/\$cc -x c/\$cc -x c -Wno-implicit-int/' \
scripts/kconfig/lxdialog/check-lxdialog.shmake menuconfigNavigate Settings -> Build Options -> Build static binary (no shared libs) if you want a static build. Save and exit.
make -j$(nproc)make defconfig
sed -i 's/# CONFIG_STATIC is not set/CONFIG_STATIC=y/' .config
make -j$(nproc)Binary: ./busybox
Symlink tree (one symlink per applet):
make install
# installs to ./_install/ by default
ls _install/bin/Or install to a custom root:
make CONFIG_PREFIX=/path/to/rootfs install./busybox --list | wc -l # number of applets
./busybox --list | head -20 # see what's included
file ./busybox # should say "statically linked" if you went static