{"id":1664,"date":"2024-05-08T09:00:00","date_gmt":"2024-05-08T09:00:00","guid":{"rendered":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/?p=1664"},"modified":"2024-08-26T06:53:49","modified_gmt":"2024-08-26T06:53:49","slug":"%e5%ae%89%e8%a3%9dsingularity%e7%84%b6%e5%be%8cgo-compiler-not-found%ef%bc%81","status":"publish","type":"post","link":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/?p=1664","title":{"rendered":"\u5b89\u88ddSingularity\u7136\u5f8cGo compiler not found\uff01"},"content":{"rendered":"\n<p>\u9019\u662f\u6709\u95dcSingularity <a href=\"https:\/\/github.com\/sylabs\/singularity\">https:\/\/github.com\/sylabs\/singularity<\/a> \u5728Ubuntu\u4e0a\u5b89\u88dd\u7684\u7b46\u8a18<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u95dc\u65bc\u5b89\u88ddculebrONT\u7684\u4f5c\u6cd5\u5728<a href=\"https:\/\/megagenome.nchu.edu.tw\/wordpress\/?p=1298\" data-type=\"post\" data-id=\"1298\">\u9019\u88e1<\/a>\uff0c\u5b89\u88ddsingularity\u5fc5\u9808\u8981\u7528\u5230Go compiler\uff0c\u6211\u5011\u9047\u5230\u4e00\u500b\u5c0f\u554f\u984c\uff0c\u5c31\u662f\u660e\u660e\u4f3c\u4e4e\u5df2\u7d93\u5b89\u88dd\u597d\u4e86Go 1.20.4\uff0c\u4f46\u662f\u5728\u57f7\u884csigularity\u5b89\u88dd\u7684\u6642\u5019\uff0c\u5b83\u9084\u662f\u51fa\u73fe\u4e86\u50cf\u9019\u6a23\u7684\u932f\u8aa4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Configuring for project `singularity' with languages: C, Golang\n=&gt; running pre-basechecks project specific checks ...\n=&gt; running base system checks ...\nchecking: host C compiler... cc\nchecking: host C++ compiler... c++\nchecking: host Go compiler (at least version 1.17)... not found!<\/code><\/pre>\n\n\n\n<p>\u9019\u4e0d\u662f1.20.4 \u8a72\u63db\u56de\u53bb\u88dd 1.17\u7684\u554f\u984c(\u7248\u672c\u6bd4\u5b83\u65b0)<\/p>\n\n\n\n<p>\u6709\u4e00\u7a2e\u8aaa\u6cd5\u662f\u66f4\u65b0Go\u7684\u6642\u5019\u5fc5\u9808\u628a\u820a\u7684\u6e05\u4e7e\u6de8\uff0c\u4e0d\u80fd\u76f4\u63a5\u628a\u65b0\u7684\u88dd\u5230\u540c\u4e00\u500b\u4f4d\u7f6e\uff0c\u5426\u5247\u4e5f\u53ef\u80fd\u6703\u51fa\u554f\u984c\u3002\u4f46\u6211\u5011\u662f\u65b0\u5b89\u88dd\uff0c\u6240\u4ee5\u4e5f\u4e0d\u662f\u9019\u6a23\u7684\u72c0\u6cc1\u3002<\/p>\n\n\n\n<p>\u4e0a\u7db2\u627e\u4e86\u4e00\u4e0b\uff0c\u5728<a href=\"https:\/\/github.com\/apptainer\/singularity\/issues\/5099\">\u9019\u88e1<\/a>\u770b\u5230\u4e86\u985e\u4f3c\u7684\u554f\u984c(\u96d6\u7136\u4ed6\u662f\u597d\u5e7e\u5e74\u524d\uff0cSingularity\u8ddfGo\u7684\u7248\u672c\u90fd\u6bd4\u6211\u5011\u65e9)\uff1a<a href=\"https:\/\/github.com\/apptainer\/singularity\/issues\/5099\">https:\/\/github.com\/apptainer\/singularity\/issues\/5099<\/a><\/p>\n\n\n\n<p>\u88e1\u9762\u6709\u4eba\u63d0\u4f9b\u4e86\u89e3\u6cd5\uff0c\u6211\u5011\u53ef\u4ee5\u4fee\u6539\u4e00\u4e0b\u4f86\u7528\uff0c\u4ee5\u4e0b\u662f\u4ed6\u5011\u7684\u505a\u6cd5\u52a0\u4e0aChatGPT\u7684\u8aaa\u660e\uff0c\u9084\u6709\u6211\u5011\u4fee\u6539\u7684\u5730\u65b9\uff1a<\/p>\n\n\n\n<p>\u66f4\u65b0apt\u5957\u4ef6\u7ba1\u7406\u5668\u7684\u5957\u4ef6\u5217\u8868\u3002<code>&amp;&amp; \\<\/code> \u8868\u793a\u5982\u679c\u7b2c\u4e00\u500b\u6307\u4ee4\u6210\u529f\u57f7\u884c\uff0c\u624d\u6703\u57f7\u884c\u4e0b\u4e00\u500b\u6307\u4ee4\u3002\u5b89\u88dd\u4e00\u7d44\u57fa\u672c\u7684\u7de8\u8b6f\u5de5\u5177\u548c\u5eab\uff0c\u9019\u4e9b\u5de5\u5177\u548c\u5eab\u5c0d\u65bc\u7de8\u8b6f\u5927\u591a\u6578\u8edf\u9ad4\u90fd\u662f\u5fc5\u9700\u7684\u3002\u9019\u4e9b\u53ef\u80fd\u662fSingularity\u6240\u9700\u7684\u4f9d\u8cf4\u5eab\u548c\u5de5\u5177\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo apt-get update &amp;&amp; \\<\/code>\n<code>sudo apt-get install -y build-essential libseccomp-dev pkg-config squashfs-tools cryptsetup<\/code><\/code><\/pre>\n\n\n\n<p>\u522a\u9664\u5148\u524d\u5df2\u5b89\u88dd\u5728<code>\/usr\/local\/go<\/code>\u8def\u5f91\u4e0b\u7684Go\u8a9e\u8a00\u5b89\u88dd\u76ee\u9304(\u9019\u5f88\u91cd\u8981\uff0c\u4e0d\u540c\u7248\u672c\u7684Go\u76f4\u63a5\u8907\u5beb\u5230\u539f\u672c\u7684\u540c\u4e00\u500b\u8def\u5f91\u6709\u6642\u6703\u51fa\u554f\u984c)\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo rm -r \/usr\/local\/go<\/code><\/code><\/pre>\n\n\n\n<p>\u8a2d\u7f6e\u4e09\u500b\u74b0\u5883\u8b8a\u6578\uff1aVERSION\uff08Go\u8a9e\u8a00\u7684\u7248\u672c\uff09\u3001OS\uff08\u4f5c\u696d\u7cfb\u7d71\uff09\u3001ARCH\uff08CPU\u67b6\u69cb\uff09\u3002<strong>\u6211\u5011\u5728\u9019\u88e1VERSION\u662f1.20.4<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>export VERSION=1.13.15 OS=linux ARCH=amd64<\/code><\/code><\/pre>\n\n\n\n<p>\u5f9eGoogle\u7684\u4e0b\u8f09\u93e1\u50cf\u7ad9\u9ede\u4e0b\u8f09\u7279\u5b9a\u7248\u672c\u7684Go\u8a9e\u8a00\u5b89\u88dd\u5305\uff0c\u4e26\u5b58\u5132\u5728\/tmp\u76ee\u9304\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>wget -O \/tmp\/go${VERSION}.${OS}-${ARCH}.tar.gz https:\/\/dl.google.com\/go\/go${VERSION}.${OS}-${ARCH}.tar.gz<\/code><\/code><\/pre>\n\n\n\n<p>\u89e3\u58d3\u7e2eGo\u8a9e\u8a00\u5b89\u88dd\u5305\u4e26\u5b89\u88dd\u5230<code>\/usr\/local<\/code>\u76ee\u9304\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo tar -C \/usr\/local -xzf \/tmp\/go${VERSION}.${OS}-${ARCH}.tar.gz<\/code><\/code><\/pre>\n\n\n\n<p>\u5c07<code>GOPATH<\/code>\u74b0\u5883\u8b8a\u6578\u8a2d\u7f6e\u70ba\u4f7f\u7528\u8005\u7684<code>$HOME\/go<\/code>\u76ee\u9304\uff0c\u4e26\u5c07\u8a72\u8a2d\u7f6e\u6dfb\u52a0\u5230<code>.bashrc<\/code>\u6a94\u6848\u4e2d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>echo 'export GOPATH=${HOME}\/go' &gt;&gt; ~\/.bashrc<\/code><\/code><\/pre>\n\n\n\n<p>\u5c07Go\u8a9e\u8a00\u7684\u57f7\u884c\u8def\u5f91\uff08bin\uff09\u6dfb\u52a0\u5230<code>PATH<\/code>\u74b0\u5883\u8b8a\u6578\u4e2d\uff0c\u4ee5\u4fbf\u65bc\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u57f7\u884cGo\u8a9e\u8a00\u7684Binary\u53ef\u57f7\u884c\u6587\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>echo 'export PATH=\/usr\/local\/go\/bin:${PATH}:${GOPATH}\/bin' &gt;&gt; ~\/.bashrc<\/code><\/code><\/pre>\n\n\n\n<p>\u5982\u6b64\u4e00\u4f86\u6703\u5728\u4f7f\u7528\u8005\u7684~\/.bashrc\u589e\u52a0\u4ee5\u4e0b\u5167\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-cff4ffc0da607514fde580f37e284265\"><code>export PATH=$PATH:\/usr\/local\/go\/bin\nexport GOPATH=${HOME}\/go\nexport PATH=\/usr\/local\/go\/bin:${PATH}:${GOPATH}\/bin<\/code><\/pre>\n\n\n\n<p>\u8b93\u73fe\u6709\u7684shell\u4f7f\u7528\u66f4\u65b0\u5f8c\u7684<code>.bashrc<\/code>\u8a2d\u7f6e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>source ~\/.bashrc<\/code><\/code><\/pre>\n\n\n\n<p>\u4f7f\u7528curl\u4e0b\u8f09\u548c\u5b89\u88ddGolangCI-Lint\u5de5\u5177\uff0c\u9019\u88e1\u6211\u5011\u7a0d\u5fae\u4fee\u6539\u4e86\uff0c\u53eb\u4ed6\u6293<strong>1.58.0<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -sSfL https:\/\/raw.githubusercontent.com\/golangci\/golangci-lint\/master\/install.sh | sh -s -- -b $(go env GOPATH)\/bin <strong>v1.58.0<\/strong><\/code><\/pre>\n\n\n\n<p>\u5275\u5efa\u4e00\u500b\u76ee\u9304\u7d50\u69cb\uff0c\u4ee5\u5c07Singularity\u7684\u539f\u59cb\u78bc\u653e\u5728\u6b63\u78ba\u7684\u4f4d\u7f6e\u3002\u7136\u5f8ccd\u5207\u63db\u5230Singularity\u539f\u59cb\u78bc\u7684\u76ee\u9304\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>mkdir -p ${GOPATH}\/src\/github.com\/sylabs &amp;&amp; \\<\/code>\n<code>cd ${GOPATH}\/src\/github.com\/sylabs<\/code><\/code><\/pre>\n\n\n\n<p>\u5f9eGitHub\u4e0a\u514b\u9686Singularity\u7684\u539f\u59cb\u78bc\u5eab\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>git clone https:\/\/github.com\/sylabs\/singularity.git<\/code>\n<strong>\u5f8c\u4f86\u5b89\u88dd\u6709\u9047\u5230\u554f\u984c\uff0c\u8aaa\u662f\u9700\u8981\u88ddsubmodules\uff0c\u6240\u4ee5\u61c9\u8a72\u662f\u9019\u6a23\u624d\u5c0d\uff1a\n<\/strong>git clone --recurse-submodules https:\/\/github.com\/sylabs\/singularity.git<\/code><\/pre>\n\n\n\n<p>\u9032\u5165\u525b\u525b\u514b\u9686\u7684Singularity\u539f\u59cb\u78bc\u76ee\u9304\u3002\u6aa2\u67e5\u5230Singularity\u7684\u7279\u5b9a\u7248\u672c\u3002<strong>\u6211\u5011\u8981\u88dd\u65b0\u7684\u7248\u672c(4.1.2)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>cd singularity<\/code>\ngit checkout v4.1.2<\/code><\/pre>\n\n\n\n<p>\u518d\u6b21\u9032\u5165Singularity\u539f\u59cb\u78bc\u76ee\u9304\u3002\u914d\u7f6eSingularity\u539f\u59cb\u78bc\u3002\u9032\u5165Singularity\u7684\u7de8\u8b6f\u76ee\u9304\u3002\u4f7f\u7528make\u547d\u4ee4\u7de8\u8b6fSingularity\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>cd ${GOPATH}\/src\/github.com\/sylabs\/singularity &amp;&amp; \\<\/code>\n<code>.\/mconfig &amp;&amp; \\<\/code>\n<code>cd .\/builddir &amp;&amp; \\<\/code>\n<code>make<\/code>\n<strong>\u9019\u88e1\u53ef\u80fd\u6703\u9047\u5230\u4e00\u4e9b\u554f\u984c\uff0c\u4ed6\u9700\u8981autoconf\u8ddflibtool\uff0c\u6c92\u88dd\u7684\u8a71sudo apt-get install autoconf\uff0csudo apt-get install libtool\u5c31\u53ef\u4ee5\u89e3\u6c7a<\/strong>\n<strong>\u6b64\u5916\u6839\u64da\u4f60\u7684\u7cfb\u7d71\uff0c\u4f60\u53ef\u80fd\u9084\u6703\u9700\u8981\u5b89\u88ddglib-2.0, fuse, libfuse-dev \u6216 fuse3, libfuse3 \u7b49\u7b49\u5957\u4ef6\u3002<\/strong><\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u4ee5\u4e0a\u90fd\u9806\u5229\u901a\u904e\uff0c\u90a3\u5c31\u662f\u6700\u5f8c\u4e00\u6b65\uff01\u5c07Singularity\u5b89\u88dd\u5230\u7cfb\u7d71\u4e2d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo make install<\/code><\/code><\/pre>\n\n\n\n<p>\u7528singularity version\u770b\u770b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>4.1.2<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9019\u662f\u6709\u95dcSingularity https:\/\/github.com\/sylabs\/singularity \u5728Ubuntu\u4e0a\u5b89\u88dd\u7684\u7b46\u8a18<\/p>\n","protected":false},"author":1,"featured_media":1698,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[5],"tags":[18],"class_list":["post-1664","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-linux"],"magazineBlocksPostFeaturedMedia":{"thumbnail":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-150x150.jpg","medium":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-300x225.jpg","medium_large":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-768x576.jpg","large":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-1024x768.jpg","1536x1536":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-1536x1152.jpg","2048x2048":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3.jpg","colormag-highlighted-post":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-392x272.jpg","colormag-featured-post-medium":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-390x205.jpg","colormag-featured-post-small":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-130x90.jpg","colormag-featured-image":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-800x445.jpg","colormag-default-news":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-150x150.jpg","colormag-featured-image-large":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-1400x600.jpg"},"magazineBlocksPostAuthor":{"name":"onion","avatar":"https:\/\/secure.gravatar.com\/avatar\/a596197721c6296d27446d1377ed931e199d7d76ae4dedbebf95195b579de271?s=96&d=mm&r=g"},"magazineBlocksPostCommentsNumber":false,"magazineBlocksPostExcerpt":"\u9019\u662f\u6709\u95dcSingularity https:\/\/github.com\/sylabs\/singularity \u5728Ubuntu\u4e0a\u5b89\u88dd\u7684\u7b46\u8a18","magazineBlocksPostCategories":["blog"],"magazineBlocksPostViewCount":28,"magazineBlocksPostReadTime":2,"magazine_blocks_featured_image_url":{"full":["https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3.jpg",1600,1200,false],"medium":["https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-300x225.jpg",300,225,true],"thumbnail":["https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-3-150x150.jpg",150,150,true]},"magazine_blocks_author":{"display_name":"onion","author_link":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/?author=1"},"magazine_blocks_comment":0,"magazine_blocks_author_image":"https:\/\/secure.gravatar.com\/avatar\/a596197721c6296d27446d1377ed931e199d7d76ae4dedbebf95195b579de271?s=96&d=mm&r=g","magazine_blocks_category":"<a href=\"#\" class=\"category-link category-link-5\">blog<\/a>","_links":{"self":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1664"}],"version-history":[{"count":13,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1664\/revisions"}],"predecessor-version":[{"id":1811,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1664\/revisions\/1811"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/1698"}],"wp:attachment":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}