diff --git a/Makefile b/Makefile
index e1dedb591290bea43ea0ae02ed55f651ed01c420..384204cd466dc7361d915335bf3895487ebdae21 100644
--- a/Makefile
+++ b/Makefile
@@ -1987,7 +1987,7 @@ endif
 endif
 ifneq ($(SYSTEM),MINGW32)
 ifneq ($(SYSTEM),Darwin)
-	$(Q) ldconfig
+	$(Q) ldconfig || true
 endif
 endif
 
@@ -2006,7 +2006,7 @@ endif
 endif
 ifneq ($(SYSTEM),MINGW32)
 ifneq ($(SYSTEM),Darwin)
-	$(Q) ldconfig
+	$(Q) ldconfig || true
 endif
 endif
 
@@ -2025,7 +2025,7 @@ endif
 endif
 ifneq ($(SYSTEM),MINGW32)
 ifneq ($(SYSTEM),Darwin)
-	$(Q) ldconfig
+	$(Q) ldconfig || true
 endif
 endif
 
@@ -2036,7 +2036,7 @@ ifneq ($(PROTOBUF_DEP),)
 	$(Q) $(MAKE) -C third_party/protobuf install prefix=$(prefix)
 ifneq ($(SYSTEM),MINGW32)
 ifneq ($(SYSTEM),Darwin)
-	$(Q) ldconfig
+	$(Q) ldconfig || true
 endif
 endif
 endif
diff --git a/templates/Makefile.template b/templates/Makefile.template
index b302623cd94401dc0626e59c044c7a664e6178f6..dead8b8d66ec55780e1d96021083fe0022ef2079 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -780,7 +780,7 @@ endif
 % endfor
 ifneq ($(SYSTEM),MINGW32)
 ifneq ($(SYSTEM),Darwin)
-	$(Q) ldconfig
+	$(Q) ldconfig || true
 endif
 endif
 </%def>
@@ -800,7 +800,7 @@ ifneq ($(PROTOBUF_DEP),)
 	$(Q) $(MAKE) -C third_party/protobuf install prefix=$(prefix)
 ifneq ($(SYSTEM),MINGW32)
 ifneq ($(SYSTEM),Darwin)
-	$(Q) ldconfig
+	$(Q) ldconfig || true
 endif
 endif
 endif