{"id":974,"date":"2021-06-21T10:06:58","date_gmt":"2021-06-21T02:06:58","guid":{"rendered":"https:\/\/www.bluesdream.com\/blog\/?p=974"},"modified":"2021-06-22T09:10:20","modified_gmt":"2021-06-22T01:10:20","slug":"rust-error-linker-link-exe-not-found-solution","status":"publish","type":"post","link":"https:\/\/www.bluesdream.com\/blog\/rust-error-linker-link-exe-not-found-solution.html","title":{"rendered":"Rust \u5728 Windows10 \u4e0b\u5b89\u88c5\/\u6267\u884c\u51fa\u9519\u7684\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<p>\u5728\u6267\u884c <code>rustc<\/code> \u547d\u4ee4\u65f6\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\u63d0\u793a\uff0c\u8bf4\u660e <code>Visual Studio C++ Build tools<\/code> \u6ca1\u6709\u5b89\u88c5\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nE:\\rust&gt;hello_word&gt;rustc main.rs\nerror: linker `link.exe` not found\n  |\n  = note: \u7cfb\u7edf\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u6587\u4ef6\u3002 (os error 2)\nnote: the msvc targets depend on the msvc linker but `link.exe` was not found\n\nnote: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option\n\nerror: aborting due to previous error\n<\/pre>\n<p><!--more--><\/p>\n<p>\u9996\u5148\u8981\u53bb\u4e0b\u8f7d <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=691126\">Visual Studio C++ Build tools<\/a>\uff0c\u7136\u540e\u6253\u5f00 <code>visualcppbuildtools_full.exe<\/code> \u6587\u4ef6\uff0c\u9009\u62e9 <code>\u9ed8\u8ba4\u503c<\/code> \u5b89\u88c5\u3002<\/p>\n<p>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u5982\u679c\u63d0\u793a\u201c\u5b89\u88c5\u5305\u4e22\u5931\u6216\u635f\u574f\u201d\uff0c\u5219\u9700\u8981\u901a\u8fc7\u4e0b\u8f7d\u79bb\u7ebf\u5305\u8fdb\u884c\u5b89\u88c5\uff0c<a href=\"https:\/\/pan.baidu.com\/s\/1DJU4zLaeQih1kOuUv2Irkw\">\u767e\u5ea6\u7f51\u76d8 - \u63d0\u53d6\u7801\uff1a6gfx<\/a>\u3002<\/p>\n<p>\u79bb\u7ebf\u5305\u4e3a <code>.iso<\/code>  \u6587\u4ef6\uff0c\u4e0b\u8f7d\u4ee5\u540e\u76f4\u63a5\u8fdb\u884c\u89e3\u538b\uff0c\u7136\u540e\u56de\u5230\u5b89\u88c5\u754c\u9762\uff0c\u5728\u201c\u8bf7\u63d0\u4f9b\u641c\u7d22\u5305\u7684\u4f4d\u7f6e\u201d\u4e2d\u9009\u62e9\u6240\u5bf9\u5e94\u63d0\u793a\u7684 <code>.msi<\/code> \u6587\u4ef6\uff0c\u5982\uff1a <code>packages\\BuildTools_MSBuild_amd64\\BuildTools_MSBuild.msi<\/code> \uff0c\u70b9\u51fb\u201c\u91cd\u8bd5\u201d\u6309\u94ae\u5373\u53ef\u3002<\/p>\n<blockquote><p>\n  \u6574\u4e2a\u79bb\u7ebf\u5305\u5927\u5c0f\u5728 <code>1.08G<\/code>  \u5bf9\u6ca1\u6709\u767e\u5ea6\u7f51\u76d8\u4f1a\u5458\u7684\u4eba\u6765\u8bf4\u53ef\u80fd\u6709\u4e9b\u5403\u529b\uff0c\u6240\u4ee5\u6211\u628a\u89e3\u538b\u540e <code>BuildTools_MSBuild_***<\/code>  \u76f8\u5173\u7684\u6587\u4ef6\u5355\u72ec\u4f20\u4e86\u4e00\u4efd\uff08\u53ea\u67094~8M\uff09\uff0c\u5927\u5bb6\u53ef\u4ee5\u5148\u5c1d\u8bd5\u4e0b\u8f7d\u9488\u5bf9\u6027\u7684 <code>\u538b\u7f29\u5305<\/code> \uff0c\u5982\u679c\u4e0d\u884c\u518d\u4e0b\u8f7d\u5b8c\u6210\u7684\u3002\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u6267\u884c rustc \u547d\u4ee4\u65f6\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\u63d0\u793a\uff0c\u8bf4\u660e Visual Studio C++ Build tools \u6ca1\u6709\u5b89\u88c5\u3002 E:\\rust&gt;hello_word&gt;rustc main.rs error: linker `link.exe` not found | = note: \u7cfb\u7edf\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u6587\u4ef6\u3002 (os error 2) note: the msvc targets depend on the msvc linker but `link.exe` was not found note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual &hellip; <a href=\"https:\/\/www.bluesdream.com\/blog\/rust-error-linker-link-exe-not-found-solution.html\"><span class=\"more-link\">[ \u67e5\u770b\u5168\u6587... ]<\/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":[75],"tags":[203],"class_list":["post-974","post","type-post","status-publish","format-standard","hentry","category-front-end","tag-rust"],"_links":{"self":[{"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/posts\/974"}],"collection":[{"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/comments?post=974"}],"version-history":[{"count":0,"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/posts\/974\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/media?parent=974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/categories?post=974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bluesdream.com\/blog\/wp-json\/wp\/v2\/tags?post=974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}