Document Actions

LD path customisation on Solaris

by Chris Miles last modified 2005-09-21 13:06

If you're a Linux admin on Solaris and are looking for the Solaris equivalent of ldconfig and /etc/ read on.

The command you are looking for is crle(1) - this is the equivalent of Linux's ldconfig but even more powerful. Read the man pages to crle for all the details. But here's a quick howto - how to add /usr/local/lib to the default path. Run crle with no arguments to see the default paths.
mad[~] crle

Default configuration file (/var/ld/ld.config) not found
  Default Library Path (ELF):   /lib:/usr/lib  (system default)
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)
Use crle -u -l /usr/local/lib to add /usr/local/lib to the default path.
mad[~] sudo crle -u -l /usr/local/lib
mad[~] crle

Configuration file [version 4]: /var/ld/ld.config  
  Default Library Path (ELF):   /lib:/usr/lib:/usr/local/lib
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)

Command line:
  crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/local/lib
And that's it really. The configuration is stored in /var/ld/ld.config but crle should always be used to manipulate it. Hope that is useful.

Chris Miles