We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
大家有问题时,解决办法: 一、先阅读一下QA 二、看一下已关闭的issue 有没有相关的回答 如果没有就加QQ群,在群里问,看看有没有人遇到相关问题。
The text was updated successfully, but these errors were encountered:
最近公司进行安可测试 项目中使用go-fastdfs 下载源码可以编译成功,但是执行的时候提示 cannot execute binary file
查看go环境变量信息
go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go" GOPRIVATE="" GOPROXY="direct" GOROOT="/usr/lib/golang" GOSUMDB="off" GOTMPDIR="" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_arm64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build229346615=/tmp/go-build -gno-record-gcc-switches"
修改build.sh GOARCH=amd64 改为与go环境变量中GOARCH值,如下 GOPATH=pwd GOOS=linux GOARCH=arm64 go build -o fileserver
pwd
重新编译,解决!
参考: https://stackoverflow.com/questions/36198418/golang-cannot-execute-binary-file-exec-format-error
Sorry, something went wrong.
No branches or pull requests
大家有问题时,解决办法:
一、先阅读一下QA
二、看一下已关闭的issue 有没有相关的回答 如果没有就加QQ群,在群里问,看看有没有人遇到相关问题。
The text was updated successfully, but these errors were encountered: