Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user: Current not implemented on linux/amd64 #14625

Closed
hacdias opened this issue Mar 3, 2016 · 4 comments
Closed

user: Current not implemented on linux/amd64 #14625

hacdias opened this issue Mar 3, 2016 · 4 comments

Comments

@hacdias
Copy link

hacdias commented Mar 3, 2016

Hello

I'm currently using Go 1.6 and crosscompiling caddy-hugo on Travis using gox. When trying to execute the executable on Linux, I get the error user: Current not implemented on linux/amd64.

I tested the Windows executable and it works well.

What should I do?

Thanks,

@OneOfOne
Copy link
Contributor

OneOfOne commented Mar 3, 2016

user.Current needs cgo on Linux, your best bet is using a linux vm to compile.

@minux
Copy link
Member

minux commented Mar 3, 2016 via email

@bradfitz
Copy link
Contributor

bradfitz commented Mar 3, 2016

During the Go 1.7 dev cycle we've updated that error text to tell you that it's because you built a pure Go binary (usually because cross-compiled) and os/user requires cgo.

Maybe we should fix this, though. I've filed #14626

@hacdias
Copy link
Author

hacdias commented Mar 3, 2016

Thank you all. I hope in the future it can be used without cgo.

@golang golang locked and limited conversation to collaborators Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants