def ldcache_step(self, conf='hpccm.conf', directory=None):
        """Add a directory to the dynamic linker cache"""

        if not directory:
            logging.error('directory is not defined')
            return ''

        return 'echo "{0}" >> {1} && ldconfig'.format(
            directory, posixpath.join('/etc/ld.so.conf.d', conf))
Add a directory to the dynamic linker cache
hpccm/templates/ldconfig.py