出现 undefined: unix.IoctlGetTermios,如何解决?

mac 上编译出现问题:

➜  unix pwd
/Users/tonyjia/Go/src/golang.org/x/sys/unix
➜  unix go build -x golang.org/x/crypto/ssh/terminal
WORK=/var/folders/fn/z04njdks6bj_v6skbjpjpmx00000gn/T/go-build046630571
mkdir -p $WORK/b001/
cat >$WORK/b001/importcfg << 'EOF' # internal
# import config
importmap golang.org/x/sys/unix=vendor/golang.org/x/sys/unix
packagefile bytes=/usr/local/Cellar/go/1.10.3/libexec/pkg/darwin_amd64/bytes.a
packagefile vendor/golang.org/x/sys/unix=/Users/tonyjia/Library/Caches/go-build/a0/a0ce18a600f9c5561ab8ffcd4fc788662c559390e286b8c74b140fc30ce807d0-d
packagefile io=/usr/local/Cellar/go/1.10.3/libexec/pkg/darwin_amd64/io.a
packagefile sync=/usr/local/Cellar/go/1.10.3/libexec/pkg/darwin_amd64/sync.a
packagefile unicode/utf8=/usr/local/Cellar/go/1.10.3/libexec/pkg/darwin_amd64/unicode/utf8.a
EOF
cd /Users/tonyjia/Go/src/golang.org/x/crypto/ssh/terminal
/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64/compile -o $WORK/b001/_pkg_.a -trimpath $WORK/b001 -p golang.org/x/crypto/ssh/terminal -complete -buildid vsHPqINW5iYAEJL2jZfy/vsHPqINW5iYAEJL2jZfy -goversion go1.10.3 -D "" -importcfg $WORK/b001/importcfg -pack -c=4 ./terminal.go ./util.go ./util_bsd.go
# golang.org/x/crypto/ssh/terminal
../../crypto/ssh/terminal/util.go:30:12: undefined: unix.IoctlGetTermios
../../crypto/ssh/terminal/util.go:38:18: undefined: unix.IoctlGetTermios
../../crypto/ssh/terminal/util.go:54:12: undefined: unix.IoctlSetTermios
../../crypto/ssh/terminal/util.go:64:18: undefined: unix.IoctlGetTermios
../../crypto/ssh/terminal/util.go:75:9: undefined: unix.IoctlSetTermios
../../crypto/ssh/terminal/util.go:80:13: undefined: unix.IoctlGetWinsize
../../crypto/ssh/terminal/util.go:98:18: undefined: unix.IoctlGetTermios
../../crypto/ssh/terminal/util.go:107:12: undefined: unix.IoctlSetTermios
../../crypto/ssh/terminal/util.go:111:8: undefined: unix.IoctlSetTermios

我的包是github上clone的

➜  x ls
crypto net    sys    text   tools  yaml
➜  x pwd
/Users/tonyjia/Go/src/golang.org/x

用go get 失败,有什么办法解决?

颜⑧
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!