{"id":13396861,"url":"https://github.com/moovweb/gvm","last_synced_at":"2025-05-13T20:16:21.449Z","repository":{"id":1971694,"uuid":"2902935","full_name":"moovweb/gvm","owner":"moovweb","description":"Go Version Manager","archived":false,"fork":false,"pushed_at":"2024-08-08T13:36:18.000Z","size":795,"stargazers_count":10861,"open_issues_count":212,"forks_count":564,"subscribers_count":149,"default_branch":"master","last_synced_at":"2025-04-28T10:57:56.568Z","etag":null,"topics":["dependency-manager","golang"],"latest_commit_sha":null,"homepage":"http://github.com/moovweb/gvm","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moovweb.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-12-03T02:34:04.000Z","updated_at":"2025-04-27T14:53:00.000Z","dependencies_parsed_at":"2023-07-05T18:49:12.335Z","dependency_job_id":"27e09646-bdc9-445d-b7a6-3b8737f12b5d","html_url":"https://github.com/moovweb/gvm","commit_stats":{"total_commits":531,"total_committers":67,"mean_commits":7.925373134328358,"dds":0.2655367231638418,"last_synced_commit":"19365a6ab8ac4920234b2612c529eed2373299db"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moovweb%2Fgvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moovweb%2Fgvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moovweb%2Fgvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moovweb%2Fgvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moovweb","download_url":"https://codeload.github.com/moovweb/gvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020650,"owners_count":22000756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependency-manager","golang"],"created_at":"2024-07-30T18:01:05.178Z","updated_at":"2025-05-13T20:16:21.431Z","avatar_url":"https://github.com/moovweb.png","language":"Shell","readme":"# gvm\n\n[![Build Status](https://travis-ci.org/moovweb/gvm.svg?branch=master)](https://travis-ci.org/moovweb/gvm)\n\nBy Josh Bussdieker (jbuss, jaja, jbussdieker) while working at [Moovweb](https://www.moovweb.com)\n\nCurrently lovingly maintained by [Benjamin Knigge](https://github.com/BenKnigge)\n\nPull requests and other any other contributions would be very much appreciated.\n\nGVM provides an interface to manage Go versions.\n\nFeatures\n========\n* Install/Uninstall Go versions with `gvm install [tag]` where tag is \"60.3\", \"go1\", \"weekly.2011-11-08\", or \"tip\"\n* List added/removed files in GOROOT with `gvm diff`\n* Manage GOPATHs with `gvm pkgset [create/use/delete] [name]`. Use `--local` as `name` to manage repository under local path (`/path/to/repo/.gvm_local`).\n* List latest release tags with `gvm listall`. Use `--all` to list weekly as well.\n* Cache a clean copy of the latest Go source for multiple version installs.\n* Link project directories into GOPATH\n\nBackground\n==========\nWhen we started developing in Go mismatched dependencies and API changes plagued our build process and made it extremely difficult to merge with other peoples changes.\n\nAfter nuking my entire GOROOT several times and rebuilding I decided to come up with a tool to oversee the process. It eventually evolved into what gvm is today.\n\nInstalling\n==========\n\nTo install:\n\n1.  Install [Bison](https://www.gnu.org/software/bison/):\n\n    ```\n    sudo apt-get install bison\n    ```\n\n1.  Install gvm:\n\n    ```\n    bash \u003c \u003c(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)\n    ```\n\nOr if you are using zsh just change `bash` with `zsh`\n\nInstalling Go\n=============\n    gvm install go1.4\n    gvm use go1.4 [--default]\nOnce this is done Go will be in the path and ready to use. $GOROOT and $GOPATH are set automatically.\n\nAdditional options can be specified when installing Go:\n\n    Usage: gvm install [version] [options]\n        -s,  --source=SOURCE      Install Go from specified source.\n        -n,  --name=NAME          Override the default name for this version.\n        -pb, --with-protobuf      Install Go protocol buffers.\n        -b,  --with-build-tools   Install package build tools.\n        -B,  --binary             Only install from binary.\n             --prefer-binary      Attempt a binary install, falling back to source.\n        -h,  --help               Display this message.\n        \n### A Note on Compiling Go 1.5+\nGo 1.5+ removed the C compilers from the toolchain and [replaced][compiler_note] them with one written in Go. Obviously, this creates a bootstrapping problem if you don't already have a working Go install. In order to compile Go 1.5+, make sure Go 1.4 is installed first. If Go 1.4 won't install try a later version (e.g. go1.5), just make sure you have the `-B` option after the version number. \n\n```\ngvm install go1.4 -B\ngvm use go1.4\nexport GOROOT_BOOTSTRAP=$GOROOT\ngvm install go1.7\n```\n\n### A Note on ARMv6 and ARMv7 architectures (32 bit)\nBinary versions for ARMv6 architecture are available [starting from Go 1.6](https://go.dev/dl/#go1.6). So, it is necessary to bootstrap with an existing binary version, then it will be possible compiling other versions. For instance, to bootstrap a setup, version `1.21.0` may be used:\n\n```\ngvm install go1.21.0 -B\ngvm use go1.21.0\n```\n\nAnd then, compile any other version:\n\n```\ngvm install go1.20.7\n```\n\n#### To install Go 1.20+\nGo 1.20+ requires go1.17.3+. Use the below:\n\n```\ngvm install go1.4 -B\ngvm use go1.4\nexport GOROOT_BOOTSTRAP=$GOROOT\ngvm install go1.17.13\ngvm use go1.17.13\nexport GOROOT_BOOTSTRAP=$GOROOT\ngvm install go1.20\ngvm use go1.20\n```\n\n[compiler_note]: https://docs.google.com/document/d/1OaatvGhEAq7VseQ9kkavxKNAfepWy2yhPUBs96FGV28/edit\n\nList Go Versions\n================\nTo list all installed Go versions (The current version is prefixed with \"=\u003e\"):\n\n    gvm list\n\nTo list all Go versions available for download:\n\n    gvm listall\n\nUninstalling\n============\nTo completely remove gvm and all installed Go versions and packages:\n\n    gvm implode\n\nIf that doesn't work see the troubleshooting steps at the bottom of this page.\n\nMac OS X Requirements\n====================\n * Install Mercurial from https://www.mercurial-scm.org/downloads\n * Install Xcode Command Line Tools from the App Store.\n\n```\nxcode-select --install\nbrew update\nbrew install mercurial\n```\n\nLinux Requirements\n==================\n\nDebian/Ubuntu\n==================\n    sudo apt-get install curl git mercurial make binutils bison gcc build-essential\n\nRedhat/Centos\n==================\n\n    sudo yum install curl\n    sudo yum install git\n    sudo yum install make\n    sudo yum install bison\n    sudo yum install gcc\n    sudo yum install glibc-devel\n\n * Install Mercurial from http://pkgs.repoforge.org/mercurial/\n\nFreeBSD Requirements\n====================\n\n    sudo pkg_add -r bash\n    sudo pkg_add -r git\n    sudo pkg_add -r mercurial\n\nVendoring Native Code and Dependencies\n==================================================\nGVM supports vendoring package set-specific native code and related\ndependencies, which is useful if you need to qualify a new configuration\nor version of one of these dependencies against a last-known-good version\nin an isolated manner.  Such behavior is critical to maintaining good release\nengineering and production environment hygiene.\n\nAs a convenience matter, GVM will furnish the following environment variables to\naid in this manner if you want to decouple your work from what the operating\nsystem provides:\n\n1. ``${GVM_OVERLAY_PREFIX}`` functions in a manner akin to a root directory\n  hierarchy suitable for auto{conf,make,tools} where it could be passed in\n  to ``./configure --prefix=${GVM_OVERLAY_PREFIX}`` and not conflict with any\n  existing operating system artifacts and hermetically be used by your\n  workspace.  This is suitable to use with ``C{PP,XX}FLAGS and LDFLAGS``, but you will have\n  to manage these yourself, since each tool that uses them is different.\n\n2. ``${PATH}`` includes ``${GVM_OVERLAY_PREFIX}/bin`` so that any tools you\n  manually install will reside there, available for you.\n\n3. ``${LD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any\n  runtime library searching can be fulfilled there on FreeBSD and Linux.\n\n4. ``${DYLD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any\n  runtime library searching can be fulfilled there on Mac OS X.\n\n5. ``${PKG_CONFIG_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib/pkgconfig`` so\n  that ``pkg-config`` can automatically resolve any vendored dependencies.\n\nRecipe for success:\n\n    gvm use go1.1\n    gvm pkgset use current-known-good\n    # Let's assume that this includes some C headers and native libraries, which\n    # Go's CGO facility wraps for us.  Let's assume that these native\n    # dependencies are at version V.\n    gvm pkgset create trial-next-version\n    # Let's assume that V+1 has come along and you want to safely trial it in\n    # your workspace.\n    gvm pkgset use trial-next-version\n    # Do your work here replicating current-known-good from above, but install\n    # V+1 into ${GVM_OVERLAY_PREFIX}.\n\nSee examples/native for a working example.\n\nTroubleshooting\n===============\nSometimes especially during upgrades the state of gvm's files can get mixed up. This is mostly true for upgrade from older version than 0.0.8. Changes are slowing down and a LTR is imminent. But for now `rm -rf ~/.gvm` will always remove gvm. Stay tuned!\n\n[![Gitter](https://badges.gitter.im/GoVesionManager/community.svg)](https://gitter.im/GoVesionManager/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n","funding_links":[],"categories":["开发工具","Popular","HarmonyOS","工具","Shell","Misc","Software Packages","Tool","🌏开源项目","软件包","Go 程序设计","Version-Switch-Tools","Go Tools","Go 工具","Version Managers","Utilities","DevOps Tools","Languages and frameworks","軟件包"],"sub_categories":["Windows Manager","未归类","DevOps Tools","Not Categorized","DevOps 工具","网络服务_其他","代码分析","Go","DevOps工具","Middlewares","Golang","devops 工具"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoovweb%2Fgvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoovweb%2Fgvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoovweb%2Fgvm/lists"}