Go: cannot find package "golang.org/x/sys/unix"

Created on 23 Aug 2017  ·  3Comments  ·  Source: golang/go

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.8.3 darwin/amd64

Does this issue reproduce with the latest release?

I don't know

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/user.name/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/xr/3w328r551jx4qbl761v5w3bsq0ghc9/T/go-build950446758=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

I'm trying to use go to prompt password input

What did you expect to see?

get prompt password input

What did you see instead?

../golang.org/x/crypto/ssh/terminal/util.go:23:2: cannot find package "golang.org/x/sys/unix" in any of:
        /usr/local/go/src/golang.org/x/sys/unix (from $GOROOT)
        /Users/wei.huang/go/src/golang.org/x/sys/unix (from $GOPATH)

When I run
go get -u golang.org/x/sys/unix

I get this error:

go get -u golang.org/x/sys/unix
# cd /Users/wei.huang/go/src/golang.org/x/sys; git pull --ff-only
error: Your local changes to the following files would be overwritten by merge:
        windows/syscall_windows.go
        windows/zsyscall_windows.go
Please commit your changes or stash them before you merge.
Aborting
Updating 43e60d7..07c1829
package golang.org/x/sys/unix: exit status 1
FrozenDueToAge

Most helpful comment

The same error happened

All 3 comments

Please commit your changes or stash them before you merge.

WAI

@cznic Thank you fix! :)

The same error happened

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rsc picture rsc  ·  3Comments

myitcv picture myitcv  ·  3Comments

enoodle picture enoodle  ·  3Comments

ashb picture ashb  ·  3Comments

natefinch picture natefinch  ·  3Comments