gvm icon indicating copy to clipboard operation
gvm copied to clipboard

gvm v1.0.22 issue installing on ubuntu

Open nkostic opened this issue 3 years ago • 18 comments

No go installed I wanted to start clean:

My prerequisite installation step: install go version manager: bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) than, because ubuntu: sudo apt-get install curl git mercurial make binutils bison gcc build-essential vm version returns: Go Version Manager v1.0.22 installed at /home/nkostic/.gvm So now to golang instalation step gvm install go1.4 In terminal:

Downloading Go source...
Installing go1.4...
 * Compiling...
/home/nkostic/.gvm/scripts/install: line 84: go: command not found
ERROR: Failed to compile. Check the logs at /home/nkostic/.gvm/logs/go-go1.4-compile.log
ERROR: Failed to use installed version

if I check the log:

at /home/nkostic/.gvm/logs/go-go1.4-compile.log
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, linux/amd64.
lib9
/home/nkostic/.gvm/gos/go1.4/src/lib9/fmt/fltfmt.c: In function '__efgfmt':
/home/nkostic/.gvm/gos/go1.4/src/lib9/fmt/fltfmt.c:437:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
  437 |   if(ndigits > prec) {
      |     ^
/home/nkostic/.gvm/gos/go1.4/src/lib9/fmt/fltfmt.c:451:2: note: here
  451 |  default:
      |  ^~~~~~~
cc1: all warnings being treated as errors
go tool dist: FAILED: gcc -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fmessage-length=0 -c -m64 -I /home/nkostic/.gvm/gos/go1.4/include -DPLAN9PORT -I /home/nkostic/.gvm/gos/go1.4/src/lib9 -o $WORK/fltfmt.o /home/nkostic/.gvm/gos/go1.4/src/lib9/fmt/fltfmt.c

Installed go 1.18 manually tried again from the top and same result. If zlog used the issue might be coming from there, not sure but unable to use this tool on Ubuntu 20.04.3 LTS following the readme instruction.

nkostic avatar Apr 12 '22 19:04 nkostic

Maybe this will help you: https://github.com/moovweb/gvm/issues/406

soulteary avatar May 12 '22 12:05 soulteary

same issue with my device as well with Ubuntu 20.04.3 LTS , I could download gvm with version v1.0.22 but getting the same error as

Downloading Go source...
Installing go1.4...
 * Compiling...
/home/nkostic/.gvm/scripts/install: line 84: go: command not found
ERROR: Failed to compile. Check the logs at /home/nkostic/.gvm/logs/go-go1.4-compile.log
ERROR: Failed to use installed version

prashant3286 avatar Jun 15 '22 16:06 prashant3286

Simple question, I'm guessing you didn't see a reply to this post. @prashant3286

Maybe this will help you: #406

soulteary avatar Jun 15 '22 16:06 soulteary

@soulteary Does this work for ubuntu as well cause you are mentioning it works doe mac m1 OS , so confused there :)

prashant3286 avatar Jun 16 '22 02:06 prashant3286

Aha, you reminded me that my description is not rigorous, it applies to both x86 and arm.

You can try the installation, the code is open source and can be reviewed at will, hope enjoy. @prashant3286

soulteary avatar Jun 16 '22 03:06 soulteary

Still getting the same error for my device @soulteary

prashant3286 avatar Jun 16 '22 17:06 prashant3286

I'm guessing you have this problem:

  • https://soulteary.com/2022/05/12/better-golang-usage-on-m1-mac.html#%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E6%9F%90%E4%B8%AA%E7%89%88%E6%9C%AC%E4%B8%8B%E8%BD%BD%E4%B8%8D%E9%A1%BA%E5%88%A9%E7%9A%84%E9%97%AE%E9%A2%98

@prashant3286

soulteary avatar Jun 19 '22 11:06 soulteary

I'm encountering the same issue on Lubuntu (not an M1 chip, just a converted Macbook Pro 2012 that I wiped MacOS off of)

justinfarrelldev avatar Aug 20 '22 03:08 justinfarrelldev

https://soulteary.com/2022/07/04/build-a-maintainable-golang-development-environment.html#%E5%AE%89%E8%A3%85-golang-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7soultearygvm

I have written another tutorial, you can try it here. @justinfarrelldev

sudo apt install -y binutils bison gcc make

curl -sSL https://github.com/soulteary/gvm/raw/master/binscripts/gvm-installer | bash

soulteary avatar Aug 21 '22 11:08 soulteary

https://soulteary.com/2022/07/04/build-a-maintainable-golang-development-environment.html#%E5%AE%89%E8%A3%85-golang-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7soultearygvm

I have written another tutorial, you can try it here. @justinfarrelldev

sudo apt install -y binutils bison gcc make

curl -sSL https://github.com/soulteary/gvm/raw/master/binscripts/gvm-installer | bash

Thank you, I'll take a look at this later and see if it works.

justinfarrelldev avatar Aug 21 '22 23:08 justinfarrelldev

gvm wants to install go from source, so go is a dependency. I guess in most cases it is not looking to get the binary distribution of the version you ask for, which most exist on the official site.

madalinignisca avatar Dec 02 '22 11:12 madalinignisca

Wanna leave a tip for anybody else trying to use it until the project is improved/fixed:

  • Add export GO_BINARY_BASE_URL=https://go.dev/dl in your ~/.bashrc file, just before sourcing gvm. #329 allowed the URL from where to download the binary to be overridden and the one I suggested I took it from the official download link.
  • Install any go version adding -B, which will download the official binary version.
  • Enjoy.

madalinignisca avatar Dec 02 '22 14:12 madalinignisca

Did this have an actual fix or workaround? I am hitting this problem myself and would like to keep using gvm, but this issue is making it hard for me to do so.

Edit:

The following seems to fix it for me since it no longer has the compiler issue.

Wanna leave a tip for anybody else trying to use it until the project is improved/fixed:

  • Add export GO_BINARY_BASE_URL=https://go.dev/dl in your ~/.bashrc file, just before sourcing gvm. Add GO_BINARY_BASE_URL env #329 allowed the URL from where to download the binary to be overridden and the one I suggested I took it from the official download link.
  • Install any go version adding -B, which will download the official binary version.
  • Enjoy.

pjkaufman avatar Feb 27 '23 14:02 pjkaufman

@pjkaufman @madalinignisca @justinfarrelldev @prashant3286 @soulteary @nkostic kindly try this GO Version Manager: https://github.com/ankitcharolia/goenv

ankitcharolia avatar Aug 05 '23 15:08 ankitcharolia

@pjkaufman @madalinignisca @justinfarrelldev @prashant3286 @soulteary @nkostic kindly try this GO Version Manager: https://github.com/ankitcharolia/goenv

same to https://github.com/moovweb/gvm/issues/406#issuecomment-1666529704

the advantage of the bash tool is that it can automatically adapt to scenarios with multiple different CPU architectures. Also, including this issue, it mainly deals with the use of the ARM environment. Your warehouse only handles x86, and the original version of gvm is in There is no problem in x86

soulteary avatar Sep 13 '23 10:09 soulteary

@soulteary I think it's pretty easy to release the binary for different CPU architecture. now, goevn supports arm, arm64, amd64 cpu architecture: https://github.com/ankitcharolia/goenv/releases/tag/1.1.7

ankitcharolia avatar Sep 15 '23 14:09 ankitcharolia

@madalinignisca thank you, your fix worked for me

sheghun avatar Nov 19 '23 10:11 sheghun

The same issue on wsl2 22.04, fix of @madalinignisca helped (using binary installation directly). Thanks!

BoThe1K avatar Feb 12 '24 16:02 BoThe1K