{"id":357,"date":"2012-12-05T07:02:08","date_gmt":"2012-12-04T23:02:08","guid":{"rendered":"http:\/\/www.sulabs.net\/?p=357"},"modified":"2012-12-07T17:01:44","modified_gmt":"2012-12-07T09:01:44","slug":"usrbinld-cannot-find-%e7%9a%84%e5%a4%84%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.sulabs.net\/?p=357","title":{"rendered":"\/usr\/bin\/ld: cannot find *** \u7684\u5904\u7406"},"content":{"rendered":"<div>\u8f6c\u8f7d\u81ea<a href=\"http:\/\/blog.sina.com.cn\/s\/blog_67bbb71101010tto.html\">http:\/\/blog.sina.com.cn\/s\/blog_67bbb71101010tto.html<\/a><br \/>\n\u7528g++\u7f16\u8bd1C++\u7a0b\u5e8f\u65f6\u663e\u793a\u51fa\uff1a<br \/>\n\/usr\/lib\/ld: cannot find -lc<br \/>\n\/usr\/lib\/ld: cannot find -lgcc_s<br \/>\n\/usr\/lib\/ld: cannot find -lm<br \/>\n\/usr\/lib\/ld: cannot find -lgcc_s\u7684\u9519\u8bef\u3002\u5728\u7f51\u4e0a\u770b\u4e86\u5f88\u591a\u4e2d\u5173\u4e8e\/usr\/lib\/ld: cannot find -lXXX\u7684\u89e3\u6cd5\uff0c\u4f46\u662f\u5927\u540c\u5c0f\u5f02\uff0c\u6ca1\u6709\u5f88\u5177\u4f53\u7684\u8bb2\u89e3\u3002\u6240\u4ee5\u628a\u6211\u7684\u89e3\u51b3\u65b9\u6cd5\u8bb0\u5f55\u4e00\u4e0b\u3002<br \/>\n<!--more--><br \/>\n\u89e3\u51b3\/usr\/lib\/ld: cannot find -lc\uff1a<br \/>\n1. \u5728\u7cfb\u7edf\u4e2d\u641c\u7d22 libc.so \u6587\u4ef6\u3002\u641c\u7d22\u51fa\u4e00\u4e2a\u65e0\u6548\u7684\u94fe\u63a5\uff0c\u5220\u9664\uff1b\u8fd8\u6709\u4e00\u4e2a libc.so.6 \uff0c\u5728\/usr\/lib\/i386-linux-gnu\u4e0b\u9762\u3002<br \/>\n2. \u8fdb\u5165usr\/lib\u76ee\u5f55\uff1acd \/usr\/lib<br \/>\n3.\u5efa\u7acb\u94fe\u63a5\uff1asudo ln -sv <wbr>\/lib\/i386-linux-gnu\/libc.so.6 libc.so<\/wbr><\/p>\n<p>\u89e3\u51b3\/usr\/lib\/ld: cannot find -lm\uff1a<br \/>\n1. \u5728\u7cfb\u7edf\u4e2d\u641c\u7d22 libm.so \u6587\u4ef6\u3002\u641c\u7d22\u51fa\u4e00\u4e2a libm.so \uff0c\u5728\/usr\/lib\/i386-linux-gnu\u4e0b\u9762\u3002<br \/>\n2. \u8fdb\u5165usr\/lib\u76ee\u5f55\uff1acd \/usr\/lib<br \/>\n3.\u5efa\u7acb\u94fe\u63a5\uff1asudo ln -sv \/usr\/lib\/i386-linux-gnu\/libm.so libm.so<\/p>\n<p>\u89e3\u51b3\/usr\/lib\/ld: cannot find -lgcc_s\uff1a<br \/>\n1. \u5728\u7cfb\u7edf\u4e2d\u641c\u7d22 libgcc_s.so \u6587\u4ef6\u3002\u540c\u6837\u5728\/usr\/lib\/i386-linux-gnu\u4e0b\u9762\u641c\u7d22\u5230\u4e86libgcc_s.so.1\u3002<br \/>\n2. \u8fdb\u5165usr\/lib\u76ee\u5f55\uff1acd \/usr\/lib 3.\u5efa\u7acb\u94fe\u63a5\uff1asudo ln -sv \/lib\/i386-linux-gnu\/libgcc_s.so.1 libgcc_s.so<br \/>\n\u5f53\u67d0\u4e00\u4e2a\u94fe\u63a5\u5efa\u7acb\u6210\u529f\u7684\u65f6\u5019\uff0c\u7cfb\u7edf\u663e\u793a\u662f\u7c7b\u4f3c\u8fd9\u6837\u7684\uff1a<br \/>\n\"libgcc_s.so\" -&gt; \"\/lib\/i386-linux-gnu\/libgcc_s.so.1\"<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\u81eahttp:\/\/blog.sina.com.cn\/s\/blog_67bbb7 &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/www.sulabs.net\/?p=357\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=357"}],"version-history":[{"count":3,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":362,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/357\/revisions\/362"}],"wp:attachment":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}