{"id":150,"date":"2024-11-17T20:14:50","date_gmt":"2024-11-17T12:14:50","guid":{"rendered":"https:\/\/www.armbian.net\/?p=150"},"modified":"2024-11-17T20:20:13","modified_gmt":"2024-11-17T12:20:13","slug":"golang","status":"publish","type":"post","link":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/","title":{"rendered":"golang"},"content":{"rendered":"<p style=\"text-align: center;\">\u65b9\u5f0f\u4e00<\/p>\n<p>\u7ec8\u7aef\u8fd0\u884c\u4ee5\u4e0b\u4ee3\u7801\uff0c\u5373\u53ef\u5b89\u88c5go\u8bed\u8a00<\/p>\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">apt install golang\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\">\u65b9\u5f0f\u4e8c<\/p>\n<p>1.\u6839\u636e\u7cfb\u7edf\u7248\u672c\u4ee5\u53ca\u60f3\u5b89\u88c5\u7684go\u7248\u672c\u627e\u5230\u5bf9\u5e94\u7684<a class=\"hl hl-1\" href=\"https:\/\/so.csdn.net\/so\/search?q=Go%E8%AF%AD%E8%A8%80&amp;spm=1001.2101.3001.7020\" target=\"_blank\" rel=\"noopener\" data-report-click=\"{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https:\/\/so.csdn.net\/so\/search?q=Go%E8%AF%AD%E8%A8%80&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\\&quot;searchword\\&quot;:\\&quot;Go\u8bed\u8a00\\&quot;}&quot;}\" data-tit=\"Go\u8bed\u8a00\" data-pretit=\"go\u8bed\u8a00\">Go\u8bed\u8a00<\/a>\u5b89\u88c5\u5305\uff0cGo\u8bed\u8a00\u4e2d\u6587\u7f51\u5730\u5740\uff1a<a href=\"https:\/\/studygolang.com\/dl\" rel=\"nofollow\">https:\/\/studygolang.com\/dl<\/a><\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.armbian.net\/wp-content\/uploads\/2024\/11\/360\u622a\u56fe20241117195442966-300x99.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-151\" data-original=\"https:\/\/www.armbian.net\/wp-content\/uploads\/2024\/11\/360\u622a\u56fe20241117195442966-300x99.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" width=\"764\" height=\"252\"  sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/div><\/p>\n<p>\u6211\u4eec\u590d\u5236\u4e0b\u8f7d\u5730\u5740<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>2.. \u5207\u6362\u5230\u00a0\/usr\/local\u00a0\u76ee\u5f55\u4e0b\uff0c\u4e0b\u8f7dGo\u8bed\u8a00\u5b89\u88c5\u5305\uff0c\u5e76\u89e3\u538b\u7f29\uff1a<\/p>\n<div class=\"hljs-ln-code\"><\/div>\n<div class=\"hljs-ln-code\">\n<div class=\"hljs-ln-line\">\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">cd \/usr\/local\/\r\n#\u4e0b\u8f7d\u5b89\u88c5\u5305\r\nwget https:\/\/studygolang.com\/dl\/golang\/go1.23.3.linux-arm64.tar.gz\r\n#\u89e3\u538b\u5b89\u88c5\u5305\r\ntar -zxvf go1.23.3.linux-arm64.tar.gz\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\u00a03.\u5efa\u7acb\u5de5\u4f5c\u76ee\u5f55\u3002\u5b98\u65b9\u5efa\u8bae\u653e\u5728 \/home\/go \u4e0b\uff0c\u521b\u5efa\u4e09\u4e2a\u76ee\u5f55\uff1abin\uff08\u7f16\u8bd1\u540e\u53ef\u7684\u6267\u884c\u6587\u4ef6\u7684\u5b58\u653e\u8def\u5f84\uff09\u3001pkg\uff08\u7f16\u8bd1\u5305\u65f6\uff0c\u751f\u6210\u7684.a\u6587\u4ef6\u7684\u5b58\u653e\u8def\u5f84\uff09\u3001src\uff08\u6e90\u7801\u8def\u5f84\uff0c\u4e00\u822c\u6211\u4eec\u7684\u5de5\u7a0b\u5c31\u521b\u5efa\u5728<code>src<\/code>\u4e0b\u9762\uff09<\/div>\n<div><\/div>\n<div>\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">mkdir -p \/home\/go\/bin\/home\/go\/pkg \/home\/go\/src\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div>4.\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<\/div>\n<div>\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u6253\u5f00 \/etc\/profile \u6587\u4ef6<\/div>\n<div>#\u5728\u6700\u4e0b\u9762\u6dfb\u52a0<\/p>\n<pre class=\"pure-highlightjs line-numbers\">export GOROOT=\/usr\/local\/go\r\nexport GOPATH=\/home\/go\r\nexport PATH=$PATH:$GOROOT\/bin:$GOPATH\/bin<\/pre>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.armbian.net\/wp-content\/uploads\/2024\/11\/360\u622a\u56fe20241117201251830-300x200.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-152\" data-original=\"https:\/\/www.armbian.net\/wp-content\/uploads\/2024\/11\/360\u622a\u56fe20241117201251830-300x200.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" width=\"300\" height=\"200\"  sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/div><br \/>\n#ssh\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u914d\u7f6e\u751f\u6548<\/p>\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">source \/etc\/profile\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>5.\u6267\u884c\u00a0go version\u00a0\u547d\u4ee4\u67e5\u770bGo\u7248\u672c\u5982\u4e0b\uff0c\u5219\u5df2\u5b89\u88c5\u6210\u529f\u3002<\/div>\n<div><\/div>\n<div>\u663e\u793a\uff1a<\/div>\n<div>\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">go version go1.23.3 linux\/arm64\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<div><\/div>\n<div>\u5b89\u88c5\u6210\u529f\uff01<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u65b9\u5f0f\u4e00 \u7ec8\u7aef\u8fd0\u884c\u4ee5\u4e0b\u4ee3\u7801\uff0c\u5373\u53ef\u5b89\u88c5go\u8bed\u8a00 apt install golang &nbsp; &nbsp;  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>golang - armbian\u670d\u52a1\u5668\u7cfb\u7edf<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"golang - armbian\u670d\u52a1\u5668\u7cfb\u7edf\" \/>\n<meta property=\"og:description\" content=\"\u65b9\u5f0f\u4e00 \u7ec8\u7aef\u8fd0\u884c\u4ee5\u4e0b\u4ee3\u7801\uff0c\u5373\u53ef\u5b89\u88c5go\u8bed\u8a00 apt install golang &nbsp; &nbsp; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/\" \/>\n<meta property=\"og:site_name\" content=\"armbian\u670d\u52a1\u5668\u7cfb\u7edf\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-17T12:14:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-17T12:20:13+00:00\" \/>\n<meta name=\"author\" content=\"2668171712\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"2668171712\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/\"},\"author\":{\"name\":\"2668171712\",\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"headline\":\"golang\",\"datePublished\":\"2024-11-17T12:14:50+00:00\",\"dateModified\":\"2024-11-17T12:20:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/\"},\"wordCount\":32,\"publisher\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"articleSection\":[\"\u7f16\u7a0b\u8bed\u8a00\u73af\u5883\u5b89\u88c5\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/\",\"url\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/\",\"name\":\"golang - armbian\u670d\u52a1\u5668\u7cfb\u7edf\",\"isPartOf\":{\"@id\":\"https:\/\/www.armbian.net\/#website\"},\"datePublished\":\"2024-11-17T12:14:50+00:00\",\"dateModified\":\"2024-11-17T12:20:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.armbian.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"golang\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.armbian.net\/#website\",\"url\":\"https:\/\/www.armbian.net\/\",\"name\":\"armbian\u670d\u52a1\u5668\u7cfb\u7edf\",\"description\":\"armbian \u8ba9\u4e07\u7269\u91cd\u65b0\u91ca\u653e\u4ef7\u503c\uff0c\u4e3a\u4e86\u65e0\u6cd5\u66ff\u4ee3\u7684\u4ef7\u503c\",\"publisher\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.armbian.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\",\"name\":\"2668171712\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png\",\"contentUrl\":\"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png\",\"width\":512,\"height\":512,\"caption\":\"2668171712\"},\"logo\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.armbian.net\"],\"url\":\"https:\/\/www.armbian.net\/index.php\/author\/2668171712\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"golang - armbian\u670d\u52a1\u5668\u7cfb\u7edf","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":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/","og_locale":"zh_CN","og_type":"article","og_title":"golang - armbian\u670d\u52a1\u5668\u7cfb\u7edf","og_description":"\u65b9\u5f0f\u4e00 \u7ec8\u7aef\u8fd0\u884c\u4ee5\u4e0b\u4ee3\u7801\uff0c\u5373\u53ef\u5b89\u88c5go\u8bed\u8a00 apt install golang &nbsp; &nbsp; [&hellip;]","og_url":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/","og_site_name":"armbian\u670d\u52a1\u5668\u7cfb\u7edf","article_published_time":"2024-11-17T12:14:50+00:00","article_modified_time":"2024-11-17T12:20:13+00:00","author":"2668171712","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"2668171712"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/#article","isPartOf":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/"},"author":{"name":"2668171712","@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"headline":"golang","datePublished":"2024-11-17T12:14:50+00:00","dateModified":"2024-11-17T12:20:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/"},"wordCount":32,"publisher":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"articleSection":["\u7f16\u7a0b\u8bed\u8a00\u73af\u5883\u5b89\u88c5"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/","url":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/","name":"golang - armbian\u670d\u52a1\u5668\u7cfb\u7edf","isPartOf":{"@id":"https:\/\/www.armbian.net\/#website"},"datePublished":"2024-11-17T12:14:50+00:00","dateModified":"2024-11-17T12:20:13+00:00","breadcrumb":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/17\/golang\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.armbian.net\/"},{"@type":"ListItem","position":2,"name":"golang"}]},{"@type":"WebSite","@id":"https:\/\/www.armbian.net\/#website","url":"https:\/\/www.armbian.net\/","name":"armbian\u670d\u52a1\u5668\u7cfb\u7edf","description":"armbian \u8ba9\u4e07\u7269\u91cd\u65b0\u91ca\u653e\u4ef7\u503c\uff0c\u4e3a\u4e86\u65e0\u6cd5\u66ff\u4ee3\u7684\u4ef7\u503c","publisher":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.armbian.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542","name":"2668171712","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.armbian.net\/#\/schema\/person\/image\/","url":"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png","contentUrl":"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png","width":512,"height":512,"caption":"2668171712"},"logo":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.armbian.net"],"url":"https:\/\/www.armbian.net\/index.php\/author\/2668171712\/"}]}},"views":1785,"_links":{"self":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/comments?post=150"}],"version-history":[{"count":3,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"predecessor-version":[{"id":156,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/150\/revisions\/156"}],"wp:attachment":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}