Error map

cannot find package in any of GOROOT / GOPATH Go: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH)

Go · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (11). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

cannot find package in any of GOROOT / GOPATH — Go: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH) (Go)cannot find…listen tcp :8080: bind: address already in use — Go: listen tcp :8080: bind: address already in use (Go)listen tcp :8080: b…x509: certificate signed by unknown authority — Go: x509: certificate signed by unknown authority (Go)x509: certificate s…too many open files — Go: accept tcp [::]:8080: accept4: too many open files / open x: too many open files (Go)too many open filesgo: updates to go.mod needed — Go: go: updates to go.mod needed; to update it: go mod tidy (Go)go: updates to go.m…missing go.sum entry — Go: missing go.sum entry for module providing package github.com/pkg/errors (imported by app); to add: go get app (Go)missing go.sum entryterminal prompts disabled / 410 Gone (private module) — Go: fatal: could not read Username for 'https://github.com': terminal prompts disabled (Go)terminal prompts di…sql: no rows in result set — Go: sql: no rows in result set (Go)sql: no rows in res…no required module provides package — Go: no required module provides package github.com/foo/bar; to add it: go get github.com/foo/bar (Go)no required module …invalid version: unknown revision — Go: go: github.com/foo/bar@v1.2.3: invalid version: unknown revision v1.2.3 (Go)invalid version: un…verifying module: checksum mismatch / SECURITY ERROR — Go: verifying module: checksum mismatch — SECURITY ERROR This download does NOT match an earlier download recorded in go.sum (Go)verifying module: c…import cycle not allowed — Go: package app/models imports app/utils imports app/models: import cycle not allowed (Go)import cycle not al…port is already allocated — Docker: Bind for 0.0.0.0:80 failed: port is already allocated (Docker)port is already all…network not found — Error response from daemon: network X not found (Docker)network not foundPool overlaps — Error response from daemon: Pool overlaps with other one on this address space (Docker)Pool overlapscannot assign to struct field m[k].f in map — Go: cannot assign to struct field users["bob"].Age in map (Go)cannot assign to st…assignment mismatch: 1 variable but f returns 2 values — Go: assignment mismatch: 1 variable but os.Open returns 2 values (Go)assignment mismatch…panic: assignment to entry in nil map — Go: panic: assignment to entry in nil map (Go)panic: assignment t…iptables: No chain/target/match — driver failed programming external connectivity on endpoint: iptables: No chain/target/match by that name (Docker)iptables: No chain/…context deadline exceeded — Go: Get "https://api.example.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers) (Go)context deadline ex…dial tcp: connect: connection refused — Go: dial tcp 127.0.0.1:5432: connect: connection refused (Go)dial tcp: connect: …cannot use x as type in assignment/argument — Go: cannot use "5" (untyped string constant) as int value in argument to f (Go)cannot use x as typ…sql: database is closed / driver: bad connection — Go: sql: database is closed (Go)sql: database is cl…root certificate file "root.crt" does not exist — PostgreSQL: root certificate file "/home/user/.postgresql/root.crt" does not exist. Either provide the file or change sslmode (SSL / TLS)root certificate fi…no Go files in directory — Go: package app/cmd: no Go files in /app/cmd / build constraints exclude all Go files (Go)no Go files in dire…REMOTE HOST IDENTIFICATION HAS CHANGED — WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! (ssh host key changed) (Linux)REMOTE HOST IDENTIF…NO_PUBKEY — The following signatures couldn't be verified because the public key is not available: NO_PUBKEY (Linux)NO_PUBKEYavc: denied — SELinux is preventing ... / avc: denied { read } for pid=... (permission denied despite correct permissions) (Linux)avc: deniedundefined: x — Go: ./main.go:12:2: undefined: handler (Go)undefined: xinvalid operation: mismatched types — Go: invalid operation: a + b (mismatched types int and float64) (Go)invalid operation: …does not implement interface (missing method) — Go: cannot use &Dog{} (value of type *Dog) as Animal value: *Dog does not implement Animal (missing method Speak) (Go)does not implement …

Directly related (11)

listen tcp :8080: bind: address already in useGo

Go: listen tcp :8080: bind: address already in use

The port your Go server wants is already taken by another process (or a previous instance of your app).

x509: certificate signed by unknown authorityGo

Go: x509: certificate signed by unknown authority

The Go TLS client does not trust the CA that signed the server's certificate.

too many open filesGo

Go: accept tcp [::]:8080: accept4: too many open files / open x: too many open files

The process reached its file-descriptor limit — usually leaked connections, files or response bodies.

go: updates to go.mod neededGo

Go: go: updates to go.mod needed; to update it: go mod tidy

`go.mod` is out of sync with the imports in your code, and Go is running with `-mod=readonly` (the default).

missing go.sum entryGo

Go: missing go.sum entry for module providing package github.com/pkg/errors (imported by app); to add: go get app

`go.sum` lacks the checksum for a dependency that your build needs.

terminal prompts disabled / 410 Gone (private module)Go

Go: fatal: could not read Username for 'https://github.com': terminal prompts disabled

Go tried to fetch a private repository without credentials (and, via the public proxy, got 404/410).

sql: no rows in result setGo

Go: sql: no rows in result set

`QueryRow(...).Scan(...)` found no row for the query.

no required module provides packageGo

Go: no required module provides package github.com/foo/bar; to add it: go get github.com/foo/bar

The code imports a package whose module is not listed in `go.mod`.

invalid version: unknown revisionGo

Go: go: github.com/foo/bar@v1.2.3: invalid version: unknown revision v1.2.3

Go cannot fetch the requested module version — the tag or branch doesn't exist, the repository is private or the proxy hasn't see…

verifying module: checksum mismatch / SECURITY ERRORGo

Go: verifying module: checksum mismatch — SECURITY ERROR This download does NOT match an earlier download recorded in go.sum

A module's content hash differs from the one recorded in `go.sum` (or the public checksum database).

import cycle not allowedGo

Go: package app/models imports app/utils imports app/models: import cycle not allowed

Two or more packages import each other directly or indirectly, which Go forbids.

Two steps away (19)

port is already allocatedDocker

Docker: Bind for 0.0.0.0:80 failed: port is already allocated

Another container or host process already publishes that host port.

network not foundDocker

Error response from daemon: network X not found

The container or Compose project refers to a Docker network that doesn’t exist (any more).

Pool overlapsDocker

Error response from daemon: Pool overlaps with other one on this address space

Docker tried to create a network whose subnet clashes with an existing Docker network (or a VPN/host route).

cannot assign to struct field m[k].f in mapGo

Go: cannot assign to struct field users["bob"].Age in map

Map values are not addressable, so you cannot modify a field of a struct stored directly in a map.

assignment mismatch: 1 variable but f returns 2 valuesGo

Go: assignment mismatch: 1 variable but os.Open returns 2 values

The number of variables on the left does not match the number of values the function returns.

panic: assignment to entry in nil mapGo

Go: panic: assignment to entry in nil map

You wrote to a map that was declared but never initialised.

iptables: No chain/target/matchDocker

driver failed programming external connectivity on endpoint: iptables: No chain/target/match by that name

Docker’s iptables rules were wiped (firewalld/ufw reload, iptables flush) while Docker was running, so it can’t publish ports.

context deadline exceededGo

Go: Get "https://api.example.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

An operation did not finish before its context deadline or HTTP client timeout.

dial tcp: connect: connection refusedGo

Go: dial tcp 127.0.0.1:5432: connect: connection refused

Nothing is listening on the host and port your Go program tried to connect to.

cannot use x as type in assignment/argumentGo

Go: cannot use "5" (untyped string constant) as int value in argument to f

A value's type is not assignable to the type required by the variable, parameter or return value.

sql: database is closed / driver: bad connectionGo

Go: sql: database is closed

The `*sql.DB` handle was closed (or the connection died) before the query ran.

root certificate file "root.crt" does not existSSL / TLS

PostgreSQL: root certificate file "/home/user/.postgresql/root.crt" does not exist. Either provide the file or change sslmode

The connection string asks for certificate verification (`sslmode=verify-ca` or `verify-full`) but no CA file was provided.

no Go files in directoryGo

Go: package app/cmd: no Go files in /app/cmd / build constraints exclude all Go files

The directory you asked Go to build contains no buildable `.go` files.

REMOTE HOST IDENTIFICATION HAS CHANGEDLinux

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! (ssh host key changed)

The server’s SSH host key differs from the one saved in ~/.ssh/known_hosts — usually because the server was rebuilt or the IP was…

NO_PUBKEYLinux

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY

apt can’t verify a repository’s signature because the repo’s signing key isn’t installed (or has expired/rotated).

avc: deniedLinux

SELinux is preventing ... / avc: denied { read } for pid=... (permission denied despite correct permissions)

SELinux blocked the access — file permissions look fine, but the file’s security context or a boolean doesn’t allow the service t…

undefined: xGo

Go: ./main.go:12:2: undefined: handler

The compiler cannot find an identifier — a typo, a missing import, or it lives in another file/package that wasn't built.

invalid operation: mismatched typesGo

Go: invalid operation: a + b (mismatched types int and float64)

You combined two values of different types; Go never converts numeric types implicitly.

does not implement interface (missing method)Go

Go: cannot use &Dog{} (value of type *Dog) as Animal value: *Dog does not implement Animal (missing method Speak)

A type was used as an interface but lacks a method or has it with a different signature or receiver type.