diff --git a/utils/install.py b/utils/install.py
index 2b53f69ed755..4591e2923e01 100644
--- a/utils/install.py
+++ b/utils/install.py
@@ -412,6 +412,9 @@ def set_env(args, compat):
         fi
         ;;
 esac
+if [ -z ${{WASMEDGE_LIB_DIR+x}} ]; then
+    export WASMEDGE_LIB_DIR="{0}/{6}"
+fi
 # Please do not edit comments below this for uninstallation purpose
 """.format(
         args.path,