diff --git a/centos-7/Dockerfile b/centos-7/Dockerfile
index 2dd31f9368e0e39ed6c5f160b0d379a13b128e90..6c3433dd122b5d6883a8a0111eb9d89f3d78f6b1 100644
--- a/centos-7/Dockerfile
+++ b/centos-7/Dockerfile
@@ -353,5 +353,5 @@ RUN yum install -y \
         wheel \
         twine
 
-ADD ldconfig/local.conf /etc/ld.so.conf.d/local.conf
-RUN ldconfig
+RUN echo -e "/usr/local/lib\n/usr/local/lib64" > /etc/ld.so.conf.d/local.conf && \
+    ldconfig
diff --git a/centos-7/ldconfig/local.conf b/centos-7/ldconfig/local.conf
deleted file mode 100644
index 7be6215fdbb422e0245e1e56235b67830b2e13a5..0000000000000000000000000000000000000000
--- a/centos-7/ldconfig/local.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/local/lib
-/usr/local/lib64