Cannot build crypto package. undefined: unix.VMIN / unix.VTIME / unix.TIOCGETA

I have a project that imports “golang.org/x/crypto/bcrypt” and when I try to run go get -u or go build I get the following errors:

# golang.org/x/crypto/ssh/terminal
../../../golang.org/x/crypto/ssh/terminal/util.go:55: undefined: unix.VMIN
../../../golang.org/x/crypto/ssh/terminal/util.go:56: undefined: unix.VTIME
../../../golang.org/x/crypto/ssh/terminal/util_bsd.go:11: undefined: unix.TIOCGETA
../../../golang.org/x/crypto/ssh/terminal/util_bsd.go:12: undefined: unix.TIOCSETA

I’m running this on a Macbook Pro 2017, macOS Sierra 10.12.6 with Go 1.8 installed. Can anyone give me some pointers on what could be going wrong?

So, not sure what the problem was. But I just ended up uninstalling go with sudo rm -rf /usr/local/go/ and deleting my go path. Restarted my machine. And reinstalled everything and recreated my go path. That fixed the issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.