ldconfig.8 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. .TH ldconfig 8 "14 March 1998"
  2. .SH NAME
  3. ldconfig \- determine run-time link bindings
  4. .SH SYNOPSIS
  5. ldconfig
  6. .RB [ \-DvqnNX ]
  7. .RB [ \-f\ conf ]
  8. .RB [ \-C\ cache ]
  9. .RB [ \-r\ root ]
  10. .IR directory \ ...
  11. .PD 0
  12. .PP
  13. .PD
  14. ldconfig
  15. .B \-l
  16. .RB [ \-Dvq ]
  17. .IR library \ ...
  18. .PD 0
  19. .PP
  20. .PD
  21. ldconfig
  22. .B \-p
  23. .SH DESCRIPTION
  24. .B ldconfig
  25. creates the necessary links and cache (for use by the run-time linker,
  26. .IR ld.so )
  27. to the most recent shared libraries found in the directories specified
  28. on the command line, in the file
  29. .IR /etc/ld.so.conf ,
  30. and in the trusted directories
  31. .RI ( /usr/lib
  32. and
  33. .IR /lib ).
  34. .B ldconfig
  35. checks the header and file names of the libraries it encounters when
  36. determining which versions should have their links updated.
  37. .B ldconfig
  38. ignores symbolic links when scanning for libraries.
  39. .PP
  40. .B ldconfig
  41. will attempt to deduce the type of ELF libs (ie. libc5 or libc6/glibc)
  42. based on what C libs if any the library was linked against, therefore when
  43. making dynamic libraries, it is wise to explicitly link against libc (use -lc).
  44. .PP
  45. Some existing libs do not contain enough information to allow the deduction of
  46. their type, therefore the
  47. .IR /etc/ld.so.conf
  48. file format allows the specification of an expected type. This is
  49. .B only
  50. used for those ELF libs which we can not work out. The format
  51. is like this "dirname=TYPE", where type can be libc4, libc5 or libc6.
  52. (This syntax also works on the command line). Spaces are
  53. .B not
  54. allowed. Also see the
  55. .B -p
  56. option.
  57. .PP
  58. Directory names containing an
  59. .B = are no longer legal
  60. unless they also have an expected type specifier.
  61. .PP
  62. .B ldconfig
  63. should normally be run by the super-user as it may require write
  64. permission on some root owned directories and files.
  65. It is normally run automatically at bootup, from /etc/rc, or manually
  66. whenever new DLL's are installed.
  67. .SH OPTIONS
  68. .TP
  69. .B \-D
  70. Debug mode.
  71. Implies
  72. .B \-N
  73. and
  74. .BR \-X .
  75. .TP
  76. .B \-v
  77. Verbose mode.
  78. Print current version number, the name of each directory as it
  79. is scanned and any links that are created.
  80. Overrides quiet mode.
  81. .TP
  82. .B \-q
  83. Quiet mode.
  84. Don't print warnings.
  85. .TP
  86. .B \-n
  87. Only process directories specified on the command line.
  88. Don't process the trusted directories
  89. .RI ( /usr/lib
  90. and
  91. .IR /lib )
  92. nor those specified in
  93. .IR /etc/ld.so.conf .
  94. Implies
  95. .BR \-N .
  96. .TP
  97. .B \-N
  98. Don't rebuild the cache.
  99. Unless
  100. .B \-X
  101. is also specified, links are still updated.
  102. .TP
  103. .B \-X
  104. Don't update links.
  105. Unless
  106. .B \-N
  107. is also specified, the cache is still rebuilt.
  108. .TP
  109. .B \-f conf
  110. Use
  111. .B conf
  112. instead of
  113. .IR /etc/ld.so.conf .
  114. .TP
  115. .B \-C cache
  116. Use
  117. .B cache
  118. instead of
  119. .IR /etc/ld.so.cache .
  120. .TP
  121. .B \-r root
  122. Change to and use
  123. .B root
  124. as the root directory.
  125. .TP
  126. .B \-l
  127. Library mode.
  128. Manually link individual libraries.
  129. Intended for use by experts only.
  130. .TP
  131. .B \-p
  132. Print the lists of directories and candidate libraries stored in
  133. the current cache.
  134. .SH EXAMPLES
  135. In the bootup file
  136. .I /etc/rc
  137. having the line
  138. .RS
  139. /sbin/ldconfig -v
  140. .RE
  141. will set up the correct links for the shared binaries and rebuild
  142. the cache.
  143. .TP
  144. On the command line
  145. .RS
  146. # /sbin/ldconfig -n /lib
  147. .RE
  148. as root after the installation of a new DLL, will properly update the
  149. shared library symbolic links in /lib.
  150. .SH FILES
  151. .PD 0
  152. .TP 20
  153. .B /lib/ld.so
  154. execution time linker/loader
  155. .TP 20
  156. .B /etc/ld.so.conf
  157. File containing a list of colon, space, tab, newline, or comma spearated
  158. directories in which to search for libraries.
  159. .TP 20
  160. .B /etc/ld.so.cache
  161. File containing an ordered list of libraries found in the directories
  162. specified in
  163. .BR /etc/ld.so.conf .
  164. .TP
  165. .B lib*.so.version
  166. shared libraries
  167. .PD
  168. .SH SEE ALSO
  169. .BR ldd (1),
  170. .BR ld.so (8).
  171. .SH BUGS
  172. .LP
  173. .BR ldconfig 's
  174. functionality, in conjunction with
  175. .BR ld.so ,
  176. is only available for executables compiled using libc version 4.4.3 or greater.
  177. .PP
  178. .BR ldconfig ,
  179. being a user process, must be run manually and has no means of dynamically
  180. determining and relinking shared libraries for use by
  181. .BR ld.so
  182. when a new DLL is installed.
  183. .SH AUTHORS
  184. David Engel and Mitch D'Souza.