diff --git a/centos/Dockerfile b/centos/Dockerfile
index 04bc3b08136fe1916f81060dc6274aee8813f85f..6a13a7183f5cceb22cedd68d0120ad4ef3c9d2cc 100644
--- a/centos/Dockerfile
+++ b/centos/Dockerfile
@@ -427,6 +427,7 @@ RUN version=3.7.12 && \
     curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
     tar -xf Python-${version}.tgz && \
     cd Python-${version} && \
+    sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
     ./configure \
         --prefix=/usr \
         --enable-optimizations \
@@ -446,6 +447,7 @@ RUN version=3.8.19 && \
     curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
     tar -xf Python-${version}.tgz && \
     cd Python-${version} && \
+    sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
     ./configure \
         --prefix=/usr \
         --enable-optimizations \
@@ -480,6 +482,7 @@ RUN version=3.9.19 && \
     curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
     tar -xf Python-${version}.tgz && \
     cd Python-${version} && \
+    sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
     ./configure \
         --prefix=/usr \
         --enable-optimizations \
@@ -631,6 +634,7 @@ RUN version=3.8.19 && \
     curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
     tar -xf Python-${version}.tgz && \
     cd Python-${version} && \
+    sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
     CFLAGS="-fPIC" LDFLAGS="-fPIC" ./configure \
         --prefix=/opt/python/3.8 \
         --enable-optimizations \