Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Can't install mage on Ubuntu 22.04 WSL under Windows 10 #510

Open
brut0 opened this issue Jun 13, 2024 · 1 comment
Open

Bug: Can't install mage on Ubuntu 22.04 WSL under Windows 10 #510

brut0 opened this issue Jun 13, 2024 · 1 comment
Labels

Comments

@brut0
Copy link

brut0 commented Jun 13, 2024

Bug Description
Installation failure message under mage installation

What did you do?

  1. Install go in my home directory
  2. Try to install mage

What did you expect to happen?
I expected the install to work.

What actually happened?
mage doesn't install

Environment

  • Mage Version: 1.15.0
  • OS: Ubuntu 22.04

Additional context
Erro message after go run bootstrap.go:

warning: GOPATH set to GOROOT (/home/user/go-1.22.4) has no effect
warning: GOPATH set to GOROOT (/home/user/go-1.22.4) has no effect
Running target: Install
exec: go "env" "GOBIN"
warning: GOPATH set to GOROOT (/home/user/go-1.22.4) has no effect
exec: git "rev-parse" "--short" "HEAD"
exec: git "describe" "--tags"
exec: go "build" "-o" "/home/user/go-1.22.4/mage" "-ldflags=-X \"github.com/magefile/mage/mage.timestamp=2024-06-13T14:45:35+03:00\" -X \"github.com/magefile/mage/mage.commitHash=2385abb\" -X \"github.com/magefile/mage/mage.gitTag=v1.15.0-5-g2385abb\"" "github.com/magefile/mage"

After second approach to instal via command go get -u -d github.com/magefile/mage:

go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.
@brut0 brut0 added the 🐜 bug label Jun 13, 2024
@danielh2942
Copy link

This is a configuration issue!
GOROOT should be where go is installed and GOPATH should be your go workspace :D

https://pkg.go.dev/cmd/go#hdr-Environment_variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants