{"id":517,"date":"2024-03-13T11:44:21","date_gmt":"2024-03-13T03:44:21","guid":{"rendered":"https:\/\/su.f3ck.cc\/?p=517"},"modified":"2024-03-13T11:44:21","modified_gmt":"2024-03-13T03:44:21","slug":"how-to-resolve-package-crypto-ecdh-is-not-in-goroot-error-in-linux","status":"publish","type":"post","link":"https:\/\/su.f3ck.cc\/?p=517","title":{"rendered":"How to Resolve \u201cPackage crypto\/ecdh is not in GOROOT\u201d Error in Linux"},"content":{"rendered":"\n<p id=\"4f18\">Have you encountered the \u201cPackage crypto\/ecdh is not in GOROOT\u201d error while working with Go in Linux? This error can be frustrating, but it\u2019s typically due to misconfigurations or outdated Go installations. In this quick guide, we\u2019ll walk you through the steps to resolve this issue.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"419d\">Uninstall Go<\/h1>\n\n\n\n<p id=\"9c6e\">If you suspect that your current Go installation is causing the problem, you can uninstall it before re-installing the latest version. Use the following commands:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Remove the golang-go package:<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"dcd3\">$ sudo apt-get remove golang-go<\/p>\n<\/blockquote>\n\n\n\n<p id=\"2d38\">2. Remove the golang-go dependencies:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"ebd8\">$ sudo apt-get remove \u2014 auto-remove golang-go<\/p>\n<\/blockquote>\n\n\n\n<p id=\"5ab9\">3. Uninstall the existing Go package:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"4b6f\">$ sudo rm -rvf \/usr\/local\/go<\/p>\n<\/blockquote>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"1307\">Install the New Go Version<\/h1>\n\n\n\n<p id=\"6ad6\">Now, let\u2019s install the latest Go version:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download the Go archive:<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"47a7\">$ wget&nbsp;<a class=\"af oe\" href=\"https:\/\/dl.google.com\/go\/go1.21.3.linux-amd64.tar.gz\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/dl.google.com\/go\/go1.21.3.linux-amd64.tar.gz<\/a><\/p>\n<\/blockquote>\n\n\n\n<p id=\"ed2c\">2. Extract the archive file:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"9e5e\">$ sudo tar -xvf go1.21.3.linux-amd64.tar.gz<\/p>\n<\/blockquote>\n\n\n\n<p id=\"34f8\">3. Place the extracted Go directory in the desired location (e.g., \/usr\/local):<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"4ac8\">$ sudo mv go \/usr\/local<\/p>\n<\/blockquote>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"a6ab\">Set Up Go Environment Variables<\/h1>\n\n\n\n<p id=\"bab5\">To configure Go properly, you need to set up environment variables:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Set GOROOT to the Go installation location:<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"22c9\">$ export GOROOT=\/usr\/local\/go<\/p>\n<\/blockquote>\n\n\n\n<p id=\"2652\">2. Define GOPATH as your Go workspace directory:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"8453\">$ export GOPATH=$HOME\/go<\/p>\n<\/blockquote>\n\n\n\n<p id=\"f294\">3. Add Go binary paths to your PATH:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"cf4a\">$ export PATH=$GOPATH\/bin:$GOROOT\/bin:$PATH<\/p>\n<\/blockquote>\n\n\n\n<p id=\"bebc\">4. Reload environment variables:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"5a2e\">$ source ~\/.profile<\/p>\n<\/blockquote>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"493c\">Verify Your Go Installation<\/h1>\n\n\n\n<p id=\"c2ae\">Finally, verify your Go installation to ensure it\u2019s working correctly:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"d99f\">$ go version<\/p>\n<\/blockquote>\n\n\n\n<p id=\"b811\">With these steps, you should have successfully resolved the \u201cPackage crypto\/ecdh is not in GOROOT\u201d error and updated your Go installation to the latest version. Your Go environment should now be correctly configured and ready for your projects. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you encountered the \u201cPackage crypto\/ecdh is not in &hellip; <a href=\"https:\/\/su.f3ck.cc\/?p=517\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cHow to Resolve \u201cPackage crypto\/ecdh is not in GOROOT\u201d Error in Linux\u201d<\/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":[1],"tags":[17,15,4],"class_list":["post-517","post","type-post","status-publish","format-standard","hentry","category-1","tag-linux","tag-15","tag-4"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":400,"url":"https:\/\/su.f3ck.cc\/?p=400","url_meta":{"origin":517,"position":0},"title":"Debian 11\u642d\u5efanaiveproxy\u670d\u52a1\u5668","author":"suhaha","date":"2022-12-09","format":false,"excerpt":"naiveproxy \u662f\u57fa\u4e8ecaddy\u4f7f\u7528go\u8bed\u8a00\u5f00\u53d1\u7684\u4e00\u4e2a\u8f6c\u53d1\u670d\u52a1\u5668\u3002\u4f5c\u8005\u7684github\u5730\u5740 ht\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":477,"url":"https:\/\/su.f3ck.cc\/?p=477","url_meta":{"origin":517,"position":1},"title":"warp-cli \u89e3\u51b3chatGPT\u8bbf\u95ee\u9650\u5236","author":"suhaha","date":"2023-03-08","format":false,"excerpt":"https:\/\/developers.cloudflare.com\/warp-client\/get-\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":475,"url":"https:\/\/su.f3ck.cc\/?p=475","url_meta":{"origin":517,"position":2},"title":"Tor Browser in fullscreen mode","author":"suhaha","date":"2023-03-06","format":false,"excerpt":"Tor Browser in fullscreen mode can help fingerprin\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":530,"url":"https:\/\/su.f3ck.cc\/?p=530","url_meta":{"origin":517,"position":3},"title":"OpenWRT \u5b9e\u73b0HP1020\u6253\u5370\u673a\u7f51\u7edc\u5171\u4eab","author":"suhaha","date":"2024-05-06","format":false,"excerpt":"1\u3001\u4e0b\u8f7dHP1020\u56fa\u4ef6\u6587\u4ef6sihp1020.dl\u6587\u4ef6\u81f3\/etc\u76ee\u5f55 2\u3001\u5728USB\u70ed\u62d4\u63d2\u89e6\u53d1\u76ee\u5f55\u4e0b\u5efa\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":256,"url":"https:\/\/su.f3ck.cc\/?p=256","url_meta":{"origin":517,"position":4},"title":"\u540e\u6392\u5b89\u5168\u5e26","author":"suhaha","date":"2021-10-16","format":false,"excerpt":"","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/10\/main-qimg-591c684efb67887870b83cb1453a0e19.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":345,"url":"https:\/\/su.f3ck.cc\/?p=345","url_meta":{"origin":517,"position":5},"title":"\ud83d\ude2d","author":"suhaha","date":"2022-12-01","format":false,"excerpt":"\ud83d\ude2d\ud83d\ude2e\u200d\ud83d\udca8","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2022\/12\/IMG_9319-scaled.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2022\/12\/IMG_9319-scaled.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2022\/12\/IMG_9319-scaled.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2022\/12\/IMG_9319-scaled.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2022\/12\/IMG_9319-scaled.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2022\/12\/IMG_9319-scaled.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=517"}],"version-history":[{"count":0,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions"}],"wp:attachment":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}