diff --git a/configure b/configure
index 9b322284c31181b2ff0cdedb34b8eb8979febf12..6099be1d848c7f52ea02694d6d86583093de440f 100755
--- a/configure
+++ b/configure
@@ -2154,6 +2154,10 @@ for target in $target_list; do
       ;;
   esac
 done
+# The EDK2 binaries are compressed with bzip2
+if test "$edk2_blobs" = "yes" && ! has bzip2; then
+  error_exit "The bzip2 program is required for building QEMU"
+fi
 
 feature_not_found() {
   feature=$1