ldconfig: Path `/lib/x86_64-linux-gnu' given more than once

ldconfig.real searches /lib/x86_64-linux-gnu and /usr/lib/x86_64-linux-gnu by default.

On my system there is a configuration file in /etc/ld.so.conf.d/x86_64-linux-gnu.conf that included these directories, hence causing the error.

I then discovered that this file is created by the libc6 package. Thus, the /etc/ld.so.conf.d/x86_64-linux-gnu.conf file can be safely deleted.

When you run ldconfig --verbose again, you will see that those two directories are still indexed.