{"id":1185,"date":"2014-02-12T15:20:25","date_gmt":"2014-02-12T07:20:25","guid":{"rendered":"http:\/\/www.dogeye.net\/?p=1185"},"modified":"2014-02-12T15:20:25","modified_gmt":"2014-02-12T07:20:25","slug":"linux%e7%9a%84%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8fld_debug%e8%b0%83%e8%af%95so%e7%9a%84%e5%8a%a0%e8%bd%bd","status":"publish","type":"post","link":"https:\/\/ykyi.net\/?p=1185","title":{"rendered":"Linux\u7684\u73af\u5883\u53d8\u91cfLD_DEBUG\u8c03\u8bd5so\u7684\u52a0\u8f7d"},"content":{"rendered":"<p><em style=\"line-height: 1.6em;\">\u4e00\u4e2a\u7a0d\u5fae\u6709\u7ecf\u9a8c\u7684<\/em><em style=\"line-height: 1.6em;\">Linux<\/em><em style=\"line-height: 1.6em;\">\u7a0b\u5e8f\u5458\u90fd\u77e5\u9053\u4f7f\u7528<\/em><em style=\"line-height: 1.6em;\">LD_LIBRARY_PATH<\/em><span style=\"line-height: 1.6em;\">&nbsp;\u6765\u4e34\u65f6\u8bbe\u7f6e\u52a0\u8f7d\u5668\u641c\u7d22\u52a8\u6001\u94fe\u63a5\u5e93so\u7684\u8def\u5f84\u987a\u5e8f\u3002\u4f46\u53e6\u4e00\u4e2a\u4e0d\u4e3a\u4eba\u77e5\u7684\u73af\u5883\u53d8\u91cf\u662fLD_DEBUG\u3002\u8fd9\u4e2a\u53d8\u91cf\u53ef\u4ee5\u63d0\u4f9b\u975e\u5e38\u8be6\u7ec6\u7684\u52a0\u8f7d\u52a8\u6001\u94fe\u63a5\u5e93\u7684\u4fe1\u606f\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>\u53ef\u4ee5\u628aLD_DEBUG\u8bbe\u6210\u4ee5\u4e0b\u503c\uff1a<\/p>\n<p>export LD_DEBUG=files &nbsp; &nbsp; # \u663e\u793a\u5e93\u7684\u4f9d\u8d56\u6027\u548c\u52a0\u8f7d\u7684\u987a\u5e8f<\/p>\n<p>export LD_DEBUG=bindings &nbsp;# \u7b26\u53f7\u7ed1\u5b9a<\/p>\n<p>export LD_DEBUG=libs &nbsp; # \u663e\u793a\u52a0\u8f7d\u5668\u67e5\u627e\u5e93\u65f6\u4f7f\u7528\u7684\u8def\u5f84\u7684\u987a\u5e8f<\/p>\n<p>export LD_DEBUG=versions &nbsp;# \u7248\u672c\u4f9d\u8d56\u6027<\/p>\n<p>export LD_DEBUG=help &nbsp;# LD_DEBUG\u7684\u5e2e\u52a9\u4fe1\u606f<\/p>\n<p>&nbsp;<\/p>\n<p>\u8bd5\u4e00\u4e0b\u628aLD_DEBUG\u8bbe\u6210\u4ee5\u4e0a\u503c\u4e4b\u4e00\uff0c\u518d\u968f\u4fbf\u8fd0\u884c\u4e00\u4e2a\u7a0b\u5e8f\u8bd5\u8bd5\u3002<\/p>\n<p>\u4e00\u4e2a\u8bd5\u9a8c\uff1a<\/p>\n<pre class=\"brush:other\">root@vicarious:\/home\/kamus\/projs\/horoscope\/bins# export LD_DEBUG=libs\n\nroot@vicarious:\/home\/kamus\/projs\/horoscope\/bins# vim my.conf\n\n     24360:   find library=libm.so.6 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/lib\/x86_64-linux-gnu\/libm.so.6\n\n     24360:\n\n     24360:   find library=libtinfo.so.5 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/lib\/x86_64-linux-gnu\/libtinfo.so.5\n\n     24360:\n\n     24360:   find library=libselinux.so.1 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/lib\/x86_64-linux-gnu\/libselinux.so.1\n\n     24360:\n\n     24360:   find library=libacl.so.1 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/lib\/x86_64-linux-gnu\/libacl.so.1\n\n     24360:\n\n     24360:   find library=libgpm.so.2 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/usr\/lib\/x86_64-linux-gnu\/libgpm.so.2\n\n     24360:\n\n     24360:   find library=libc.so.6 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/lib\/x86_64-linux-gnu\/libc.so.6\n\n     24360:\n\n     24360:   find library=libdl.so.2 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/lib\/x86_64-linux-gnu\/libdl.so.2\n\n     24360:\n\n     24360:   find library=libattr.so.1 [0]; searching\n\n     24360:   search cache=\/etc\/ld.so.cache\n\n     24360:     trying file=\/lib\/x86_64-linux-gnu\/libattr.so.1<\/pre>\n<p>copyright ykyi.net<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2a\u7a0d\u5fae\u6709\u7ecf\u9a8c\u7684Linux\u7a0b\u5e8f\u5458\u90fd\u77e5\u9053\u4f7f\u7528LD_LIBRARY_PATH&nbsp;\u6765\u4e34\u65f6\u8bbe\u7f6e\u52a0\u8f7d\u5668\u641c\u7d22\u52a8\u6001\u94fe\u63a5\u5e93so\u7684\u8def\u5f84\u987a\u5e8f\u3002\u4f46\u53e6\u4e00\u4e2a\u4e0d\u4e3a\u4eba\u77e5\u7684\u73af\u5883\u53d8\u91cf\u662fLD_DEBUG\u3002\u8fd9\u4e2a\u53d8\u91cf\u53ef\u4ee5\u63d0\u4f9b\u975e\u5e38\u8be6\u7ec6\u7684\u52a0\u8f7d\u52a8\u6001\u94fe\u63a5\u5e93\u7684\u4fe1\u606f\u3002 &nbsp; \u53ef\u4ee5\u628aLD_DEBUG\u8bbe\u6210\u4ee5\u4e0b\u503c\uff1a export LD_DEBUG=files &nbsp; &nbsp; # \u663e\u793a\u5e93\u7684\u4f9d\u8d56\u6027\u548c\u52a0\u8f7d\u7684\u987a\u5e8f export LD_DEBUG=bindings &nbsp;# \u7b26\u53f7\u7ed1\u5b9a export LD_DEBUG=libs &nbsp; # \u663e\u793a\u52a0\u8f7d\u5668\u67e5\u627e\u5e93\u65f6\u4f7f\u7528\u7684\u8def\u5f84\u7684\u987a\u5e8f export LD_DEBUG=versions &nbsp;# \u7248\u672c\u4f9d\u8d56\u6027 export LD_DEBUG=help &nbsp;# LD_DEBUG\u7684\u5e2e\u52a9\u4fe1\u606f &nbsp; \u8bd5\u4e00\u4e0b\u628aLD_DEBUG\u8bbe\u6210\u4ee5\u4e0a\u503c\u4e4b\u4e00\uff0c\u518d\u968f\u4fbf\u8fd0\u884c\u4e00\u4e2a\u7a0b\u5e8f\u8bd5\u8bd5\u3002 \u4e00\u4e2a\u8bd5\u9a8c\uff1a root@vicarious:\/home\/kamus\/projs\/horoscope\/bins# export LD_DEBUG=libs root@vicarious:\/home\/kamus\/projs\/horoscope\/bins# vim my.conf 24360: find library=libm.so.6 [0]; searching 24360: search cache=\/etc\/ld.so.cache 24360: trying file=\/lib\/x86_64-linux-gnu\/libm.so.6 24360: 24360: find library=libtinfo.so.5 [0]; searching 24360: search cache=\/etc\/ld.so.cache &hellip; <a href=\"https:\/\/ykyi.net\/?p=1185\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linux\u7684\u73af\u5883\u53d8\u91cfLD_DEBUG\u8c03\u8bd5so\u7684\u52a0\u8f7d&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[27],"class_list":["post-1185","post","type-post","status-publish","format-standard","hentry","category-tech_articles","category-unix_linux","tag-debug"],"_links":{"self":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/1185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1185"}],"version-history":[{"count":0,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/1185\/revisions"}],"wp:attachment":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}