diff --git a/environment/os/amzn-2.sh b/environment/os/amzn-2.sh
index a9cc3e4b2..bac62233e 100755
--- a/environment/os/amzn-2.sh
+++ b/environment/os/amzn-2.sh
@@ -45,6 +45,7 @@ MEMGRAPH_BUILD_DEPS=(
     readline-devel # for memgraph console
     python3-devel # for query modules
     openssl-devel
+    openssl
     libseccomp-devel
     python3 python3-pip nmap-ncat # for tests
     #
diff --git a/environment/os/centos-7.sh b/environment/os/centos-7.sh
index d9fc93912..0e029fab5 100755
--- a/environment/os/centos-7.sh
+++ b/environment/os/centos-7.sh
@@ -43,6 +43,7 @@ MEMGRAPH_BUILD_DEPS=(
     readline-devel # for memgraph console
     python3-devel # for query modules
     openssl-devel
+    openssl
     libseccomp-devel
     python3 python-virtualenv python3-pip nmap-ncat # for qa, macro_benchmark and stress tests
     #