diff --git a/configure b/configure
index 03baefe1f861bb4bf817f223cb27f1af88fa0434..b9ddeaf05f695d23fd2c3d7720bb2ae034c5f81e 100755
--- a/configure
+++ b/configure
@@ -34,8 +34,8 @@ RUNTIME=$(pwd)/runtime
 
 RVAS=$(which -a riscv64-unknown-linux-gnu-as riscv64-unknown-elf-as riscv64-linux-gnu-as 2>/dev/null | grep -v "not found" | head -n1)
 RVLD=$(which -a riscv64-unknown-linux-gnu-ld riscv64-unknown-elf-ld riscv64-linux-gnu-ld 2>/dev/null | grep -v "not found" | head -n1)
-QEMU32=$(which -a qemu-riscv32-static 2>/dev/null | grep -v "not found" | head -n1)
-QEMU64=$(which -a qemu-riscv64-static 2>/dev/null | grep -v "not found" | head -n1)
+QEMU32=$(which -a qemu-riscv32 qemu-riscv32-static 2>/dev/null | grep -v "not found" | head -n1)
+QEMU64=$(which -a qemu-riscv64 qemu-riscv64-static 2>/dev/null | grep -v "not found" | head -n1)
 
 
 echo "let runtime_dir = \"${RUNTIME}\"" > src/config.ml