Getting this error: compile: version "go1.13.7" does not match go tool version "go1.12.10"

2,148 views
Skip to first unread message

Alexander Mills

unread,
Apr 9, 2020, 3:51:20 PM4/9/20
to golang-nuts
I have this go.mod file:

module github.com/channelmeter/err-id-checker

go 1.12


my go version is:

go version go1.12.10 linux/amd64


my imports just look like this:

package main

import (
"bufio"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
)

but when I run

go run .

I get this horrendous error that makes no sense:

# math/bits compile: version "go1.13.7" does not match go tool version "go1.12.10" # unicode compile: version "go1.13.7" does not match go tool version "go1.12.10" # internal/race compile: version "go1.13.7" does not match go tool version "go1.12.10" # unicode/utf8 compile: version "go1.13.7" does not match go tool version "go1.12.10" # runtime/internal/sys compile: version "go1.13.7" does not match go tool version "go1.12.10" # sync/atomic compile: version "go1.13.7" does not match go tool version "go1.12.10" # runtime/internal/atomic compile: version "go1.13.7" does not match go tool version "go1.12.10" # internal/cpu compile: version "go1.13.7" does not match go tool version "go1.12.10"


excuse my language but what the fuck is it doing? anyone know? I am on the right go version and my go.mod file requires the same go version.



Kurtis Rader

unread,
Apr 9, 2020, 5:58:55 PM4/9/20
to Alexander Mills, golang-nuts
On Thu, Apr 9, 2020 at 12:51 PM Alexander Mills <alexande...@gmail.com> wrote:
my go version is:

go version go1.12.10 linux/amd64

but when I run

go run .

I get this horrendous error that makes no sense:

# math/bits compile: version "go1.13.7" does not match go tool version "go1.12.10"


"The error is telling you that you have a weird mix of Go versions on top of one another, or mixed up together in your $PATH."

What does "go env" report? Especially the value of GOROOT.

--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
Reply all
Reply to author
Forward
0 new messages