{"id":207,"date":"2016-12-03T07:08:58","date_gmt":"2016-12-03T07:08:58","guid":{"rendered":""},"modified":"2016-12-03T07:08:58","modified_gmt":"2016-12-03T07:08:58","slug":"","status":"publish","type":"post","link":"http:\/\/weizn.net\/?p=207","title":{"rendered":"[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5"},"content":{"rendered":"<p><span style=\"font-size:16px;\">Linux\u5171\u4eab\u5e93\u8def\u5f84\u914d\u7f6e<\/span><br \/>\n<span style=\"font-size:16px;\"> Linux\u4e0b\u627e\u4e0d\u5230\u5171\u4eab\u5e93\u6587\u4ef6\u7684\u5178\u578b\u73b0\u8c61\u4e3a\u660e\u660e\u5df2\u7ecf\u5b89\u88c5\u67d0\u4e2a\u8f6f\u5305\uff08\u5982libnet\uff0cMySQL\uff09\uff0c\u7f16\u8bd1\u8fde\u63a5\u53ef\u4ee5\u6b63\u5e38\u8fdb\u884c\uff0c\u4f46\u662f\u5728\u8fd0\u884c\u65f6\u51fa\u73b0\u5982\u201cerror while loading shared libraries: libnet.so.1:cannot open shared object file :No such file or directory\u201d\u7684\u9519\u8bef\u63d0\u793a\u3002<\/span><\/p>\n<p>\n\t<span style=\"font-size:16px;\"> \u539f\u56e0\u662fLinux\u4e0b\u7684\u5171\u4eab\u5e93\u8def\u5f84\u914d\u7f6e\u4e0d\u6b63\u786e\u3002\u9ed8\u8ba4\u7684linux\u5171\u4eab\u5e93\u641c\u7d22\u8def\u5f84\u4e3a\/lib\u548c\/usr\/lib\u4e24\u4e2a\u76ee\u5f55\uff08\u4e0d\u5305\u542b\u5b50\u76ee\u5f55\uff09\uff0c\u82e5\u5171\u4eab\u5e93\u4e0d\u5728\u8fd9\u4e24\u4e2a\u8def\u5f84\uff0c\u4e0d\u80fd\u81ea\u52a8\u8fde\u63a5\u5230\uff08\u6700\u5178\u578b\u7684\u5c31\u662f\/usr\/local\/lib\uff09\u3002<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><br \/>\n<\/span>\n<\/p>\n<p><span style=\"font-size:16px;\">\u89e3\u51b3\u65b9\u6cd5\u6709\u4e94\u79cd\uff1a<\/span><br \/>\n<span style=\"font-size:16px;\">1\uff0c\u8fde\u63a5\u65f6\u4f7f\u7528\u9759\u6001\u5e93\uff08.a\u6587\u4ef6\uff09\u3002\u5728g++\u547d\u4ee4\u4e0a\u5199\u5165\u8be5.a\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u3002<\/span><br \/>\n<span style=\"font-size:16px;\">2\uff0c\u4f7f\u7528LD_LIBRARY_PATH\u73af\u5883\u53d8\u91cf\u3002\uff08\u4e34\u65f6\u6709\u6548\uff0c\u4e14\u6709\u65f6\u5019\u6ca1\u6709\u6548\u679c\uff09\uff0c\u628a\u9700\u8981\u6dfb\u52a0\u7684\u8def\u5f84\u52a0\u5165\u5230LD\uff3fLIBRARY\uff3fPATH\u4e2d\uff0c\u6ce8\u610f\u5982\u679c\u591a\u4e8e\u4e00\u4e2a\u8981\u7528\u5192\u53f7\u9694\u5f00\u3002\u5982\uff1aexport LD_LIBRARY_PATH=\/usr\/local\/lib\/minigui<\/span><br \/>\n<span style=\"font-size:16px;\">3\uff0c\u5c06\u52a8\u6001\u5e93\u6587\u4ef6\u590d\u5236\u5230\u53ef\u4ee5\u641c\u7d22\u5230\u7684\u8def\u5f84\uff08\u4e00\u822c\u662f\u7cfb\u7edf\u9ed8\u8ba4\u7684\u8def\u5f84\uff0c\u5982\/lib\u3001\/usr\/lib\uff09\u91cc\u9762\uff0c\u8fd9\u6837\u6bd4\u8f83\u72e0\uff0c\u4f46\u662f\u53ef\u80fd\u5bfc\u81f4\u4e00\u4e9b\u540e\u5373\u95ee\u9898\u3002<\/span><br \/>\n<span style=\"font-size:16px;\">4\uff0c\u7f16\u8bd1\u7684\u65f6\u5019\u8bbe\u5b9a\uff1a\u5728\u7f16\u8bd1\u6e90\u7801\u7684\u65f6\u5019\u53ef\u4ee5\u7528\u53c2\u6570\uff1a-Wl\uff0c -rpath\u6307\u5b9a\u52a8\u6001\u641c\u7d22\u7684\u8def\u5f84\u5373\u53ef\uff0c\u591a\u8def\u5f84\u53ef\u7528\u5192\u53f7\u5206\u9694\uff0c\u4f8b\u5982\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u67e5\u627e\u94fe\u63a5\u5e93\u4f7f\u7528\u7f16\u8bd1\u53c2\u6570\uff1a-Wl,-rpath=.<\/span><\/p>\n<p>\n\t<span style=\"font-size:16px;\">5\uff0c\u4fee\u6539\u7cfb\u7edf\u6587\u4ef6\/etc\/ld.so.conf\uff0c\u6dfb\u52a0\u8def\u5f84\uff0c\u8fd0\u884cldconfig\u547d\u4ee4\u3002<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><br \/>\n<\/span>\n<\/p>\n<p><span style=\"font-size:16px;\">\u7b2c\u4e94\u79cd\u65b9\u6cd5\u7684\u8bf4\u660e\u5982\u4e0b\uff1a<\/span><\/p>\n<p>\n\t<span style=\"font-size:16px;\">\u5728\/etc\/ld.so.conf\u6587\u4ef6\u4e2d\u6307\u5b9a\u4e86\u9ed8\u8ba4\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u67e5\u627e\u8def\u5f84\uff0c\u6211\u7684\/etc\/ld.so.conf\u6587\u4ef6\u5185\u5bb9\u662f\u8fd9\u6837\u7684include \/etc\/ld.so.conf.d\/*.conf\u3002\u4e5f\u5c31\u662f\u8bf4\u5b83\u95f4\u63a5\u7684\u6307\u5b9a\u4e86\u5b9a\u4e49\u8def\u5f84\u7684\u6587\u4ef6\uff0c\u6211\u4eec\u53ea\u9700\u8981\u628a\u9700\u8981\u7684\u8def\u5f84\u52a0\u5230\/etc\/ld.so.conf.d\u76ee\u5f55\u4e0b\u7684\u4efb\u4f55\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u518d\u8fd0\u884cldconfig\u5c31\u53ef\u4ee5\u4e86\uff0c\u4f46\u4e3a\u4e86\u5bb9\u6613\u7406\u89e3\uff0c\u6700\u597d\u662f\u627e\u4e00\u4e2a\u76f8\u5173\u7684\u6587\u4ef6\uff0c\u6216\u8005\u91cd\u65b0\u5efa\u7acb\u4e00\u4e2a\u6587\u4ef6\uff0c\u628a\u9700\u8981\u6dfb\u52a0\u7684\u8def\u5f84\u5199\u5165\u7136\u540e\u8fd0\u884cldconfig<\/span>\n<\/p>\n<p><span style=\"font-size:16px;\">ldconfig\u51e0\u4e2a\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9<\/span><br \/>\n<span style=\"font-size:16px;\">1. \u5f80\/lib\u548c\/usr\/lib\u91cc\u9762\u52a0\u4e1c\u897f\uff0c\u662f\u4e0d\u7528\u4fee\u6539\/etc\/ld.so.conf\u7684\uff0c\u4f46\u662f\u5b8c\u4e86\u4e4b\u540e\u8981\u8c03\u4e00\u4e0bldconfig\uff0c\u4e0d\u7136\u8fd9\u4e2alibrary\u4f1a\u627e\u4e0d\u5230<\/span><br \/>\n<span style=\"font-size:16px;\">2. \u60f3\u5f80\u4e0a\u9762\u4e24\u4e2a\u76ee\u5f55\u4ee5\u5916\u52a0\u4e1c\u897f\u7684\u65f6\u5019\uff0c\u4e00\u5b9a\u8981\u4fee\u6539\/etc\/ld.so.conf\uff0c\u7136\u540e\u518d\u8c03\u7528ldconfig\uff0c\u4e0d\u7136\u4e5f\u4f1a\u627e\u4e0d\u5230<\/span><br \/>\n<span style=\"font-size:16px;\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p><span style=\"font-size:16px;\">Linux\u5171\u4eab\u5e93\u8def\u5f84\u914d\u7f6e<\/span><br \/>\n<span style=\"font-size:16px;\"> Linux\u4e0b\u627e\u4e0d\u5230\u5171\u4eab\u5e93\u6587\u4ef6\u7684\u5178\u578b\u73b0\u8c61\u4e3a\u660e\u660e\u5df2\u7ecf\u5b89\u88c5\u67d0\u4e2a\u8f6f\u5305\uff08\u5982libnet\uff0cMySQL\uff09\uff0c\u7f16\u8bd1\u8fde\u63a5\u53ef\u4ee5\u6b63\u5e38\u8fdb\u884c\uff0c\u4f46\u662f\u5728\u8fd0\u884c\u65f6\u51fa\u73b0\u5982\u201cerror while loading shared libraries: libnet.so.1:cannot open shared object file :No such file or directory\u201d\u7684\u9519\u8bef\u63d0\u793a\u3002<\/span><\/p>\n<p>\n\t<span style=\"font-size:16px;\"> \u539f\u56e0\u662fLi&#8230;<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[332],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5 - Wayne&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/weizn.net\/?p=207\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5 - Wayne&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Linux\u5171\u4eab\u5e93\u8def\u5f84\u914d\u7f6e  Linux\u4e0b\u627e\u4e0d\u5230\u5171\u4eab\u5e93\u6587\u4ef6\u7684\u5178\u578b\u73b0\u8c61\u4e3a\u660e\u660e\u5df2\u7ecf\u5b89\u88c5\u67d0\u4e2a\u8f6f\u5305\uff08\u5982libnet\uff0cMySQL\uff09\uff0c\u7f16\u8bd1\u8fde\u63a5\u53ef\u4ee5\u6b63\u5e38\u8fdb\u884c\uff0c\u4f46\u662f\u5728\u8fd0\u884c\u65f6\u51fa\u73b0\u5982\u201cerror while loading shared libraries: libnet.so.1:cannot open shared object file :No such file or directory\u201d\u7684\u9519\u8bef\u63d0\u793a\u3002   \u539f\u56e0\u662fLi...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/weizn.net\/?p=207\" \/>\n<meta property=\"og:site_name\" content=\"Wayne&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-03T07:08:58+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"zinan\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/weizn.net\/#website\",\"url\":\"http:\/\/weizn.net\/\",\"name\":\"Wayne&#039;s Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/weizn.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/weizn.net\/?p=207#webpage\",\"url\":\"http:\/\/weizn.net\/?p=207\",\"name\":\"[\\u8f6c]Linux\\u4e0b\\u6dfb\\u52a0\\u52a8\\u6001\\u94fe\\u63a5\\u5e93\\u8def\\u5f84\\u7684\\u65b9\\u6cd5 - Wayne&#039;s Blog\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/#website\"},\"datePublished\":\"2016-12-03T07:08:58+00:00\",\"dateModified\":\"2016-12-03T07:08:58+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/weizn.net\/?p=207#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/weizn.net\/?p=207\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/weizn.net\/?p=207#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"http:\/\/weizn.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[\\u8f6c]Linux\\u4e0b\\u6dfb\\u52a0\\u52a8\\u6001\\u94fe\\u63a5\\u5e93\\u8def\\u5f84\\u7684\\u65b9\\u6cd5\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/weizn.net\/?p=207#article\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/?p=207#webpage\"},\"author\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"headline\":\"[\\u8f6c]Linux\\u4e0b\\u6dfb\\u52a0\\u52a8\\u6001\\u94fe\\u63a5\\u5e93\\u8def\\u5f84\\u7684\\u65b9\\u6cd5\",\"datePublished\":\"2016-12-03T07:08:58+00:00\",\"dateModified\":\"2016-12-03T07:08:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=207#webpage\"},\"wordCount\":96,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"articleSection\":[\"Linux\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/weizn.net\/?p=207#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\",\"name\":\"zinan\",\"logo\":{\"@id\":\"http:\/\/weizn.net\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5 - Wayne&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/weizn.net\/?p=207","og_locale":"zh_CN","og_type":"article","og_title":"[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5 - Wayne&#039;s Blog","og_description":"Linux\u5171\u4eab\u5e93\u8def\u5f84\u914d\u7f6e  Linux\u4e0b\u627e\u4e0d\u5230\u5171\u4eab\u5e93\u6587\u4ef6\u7684\u5178\u578b\u73b0\u8c61\u4e3a\u660e\u660e\u5df2\u7ecf\u5b89\u88c5\u67d0\u4e2a\u8f6f\u5305\uff08\u5982libnet\uff0cMySQL\uff09\uff0c\u7f16\u8bd1\u8fde\u63a5\u53ef\u4ee5\u6b63\u5e38\u8fdb\u884c\uff0c\u4f46\u662f\u5728\u8fd0\u884c\u65f6\u51fa\u73b0\u5982\u201cerror while loading shared libraries: libnet.so.1:cannot open shared object file :No such file or directory\u201d\u7684\u9519\u8bef\u63d0\u793a\u3002   \u539f\u56e0\u662fLi...","og_url":"http:\/\/weizn.net\/?p=207","og_site_name":"Wayne&#039;s Blog","article_published_time":"2016-12-03T07:08:58+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"zinan"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/weizn.net\/#website","url":"http:\/\/weizn.net\/","name":"Wayne&#039;s Blog","description":"","publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/weizn.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/weizn.net\/?p=207#webpage","url":"http:\/\/weizn.net\/?p=207","name":"[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5 - Wayne&#039;s Blog","isPartOf":{"@id":"http:\/\/weizn.net\/#website"},"datePublished":"2016-12-03T07:08:58+00:00","dateModified":"2016-12-03T07:08:58+00:00","breadcrumb":{"@id":"http:\/\/weizn.net\/?p=207#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/weizn.net\/?p=207"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/weizn.net\/?p=207#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/weizn.net\/"},{"@type":"ListItem","position":2,"name":"[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5"}]},{"@type":"Article","@id":"http:\/\/weizn.net\/?p=207#article","isPartOf":{"@id":"http:\/\/weizn.net\/?p=207#webpage"},"author":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"headline":"[\u8f6c]Linux\u4e0b\u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84\u7684\u65b9\u6cd5","datePublished":"2016-12-03T07:08:58+00:00","dateModified":"2016-12-03T07:08:58+00:00","mainEntityOfPage":{"@id":"http:\/\/weizn.net\/?p=207#webpage"},"wordCount":96,"commentCount":0,"publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"articleSection":["Linux"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/weizn.net\/?p=207#respond"]}]},{"@type":["Person","Organization"],"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264","name":"zinan","logo":{"@id":"http:\/\/weizn.net\/#personlogo"}}]}},"_links":{"self":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=207"}],"version-history":[{"count":0,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/207\/revisions"}],"wp:attachment":[{"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}