简体   繁体   English

golang fork exec错误-gobuffalo

[英]golang fork exec error - gobuffalo

I am new to go and trying to create some basic gobuffalo apps but I keep encountering fork/exec errors such as 我是新手,尝试创建一些基本的gobuffalo应用程序,但是我不断遇到fork/exec错误,例如

ERRO[0000] Error: fork/exec /usr/local/bin/buffalo: exec format error

My buffalo app is currently in the directory: 我的水牛应用当前位于目录中:

~/projects/golang/src/github.com/buffalo_experiments/coke

I tried renaming the buffalo_experiments folder to match my os usr which is clementoh but it didn't do any good. 我尝试重命名buffalo_experiments文件夹以匹配我的os usr(这是clementoh但没有任何好处。

Could someone please explain to me what's going on? 有人可以告诉我发生了什么事吗? I think because of this error... the migration files are not being generated when I run: 我认为由于此错误...在运行时未生成迁移文件:

buffalo g resource users name email bio:nulls.Text

Full stdout 全标准

      create  actions/users.go
      create  actions/users_test.go
      create  locales/users.en-us.yaml
      create  templates/users/_form.html
      create  templates/users/edit.html
      create  templates/users/index.html
      create  templates/users/new.html
      create  templates/users/show.html
         run  buffalo db g model user name email bio:nulls.Text
         run  goimports -w actions/actions_test.go actions/app.go actions/home.go actions/home_test.go actions/render.go actions/users.go actions/users_test.go grifts/db.go grifts/init.go main.go models/models.go models/models_test.go
Usage:
  buffalo generate resource [name] [flags]

Aliases:
  resource, r

Examples:
$ buffalo g resource users
Generates:

- actions/users.go
- actions/users_test.go
- models/user.go
- models/user_test.go
- migrations/2016020216301234_create_users.up.fizz
- migrations/2016020216301234_create_users.down.fizz

$ buffalo g resource users --skip-migration
Generates:

- actions/users.go
- actions/users_test.go
- models/user.go
- models/user_test.go

$ buffalo g resource users --skip-model
Generates:

- actions/users.go
- actions/users_test.go

$ buffalo g resource users --use-model users
Generates:

- actions/users.go
- actions/users_test.go

Flags:
  -h, --help               help for resource
  -n, --name string        allows to define a different model name for the resource being generated.
  -s, --skip-migration     tells resource generator not-to add model migration
      --skip-model         tells resource generator not to generate model nor migrations
      --skip-templates     tells resource generator not to generate templates for the resource
      --use-model string   tells resource generator to reference an existing model in generated code

ERRO[0000] Error: fork/exec /usr/local/bin/buffalo: exec format error

I had the same issue:) you are may using the wrong buffalo binary /usr/local/bin/buffalo . 我有同样的问题:)您可能使用了错误的buffalo二进制文件/usr/local/bin/buffalo It should be the binary which is located in your $GOPATH. 它应该是位于$ GOPATH中的二进制文件。 For Example: $GOPATH/bin/buffalo 例如: $GOPATH/bin/buffalo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:fork/exec:没有这样的文件或目录——在 docker 中运行 Golang 代码时 - Error:fork/exec : no such file or directory -- when run Golang code in docker 如何在Golang中使用gobuffalo / packr - How to Use gobuffalo/packr with Golang Go fork/exec 权限被拒绝错误 - Go fork/exec permission denied error Gobuffalo 错误“没有定义名为 development 的连接!” - Gobuffalo error "There is no connection named development defined!" Golang exec.Command()错误 - 通过golang命令ffmpeg - Golang exec.Command() error - ffmpeg command through golang Golang exec.Command Output 空白(无错误) - Golang exec.Command Output blank(no error) Go 构建:cgo fork/exec 权限被拒绝错误 - Go build: cgo fork/exec permission denied error 安装 gobuffalo 后如何修复“/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags”错误 - How to fix '/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags' error after installing gobuffalo 无法实例化提供者 - Terraform Cloud 的自定义提供者 - [fork/exec - exec 格式错误] - Failed to instantiate provider - Custom Provider for Terraform Cloud - [fork/exec - exec format error] 运行AWS Golang Lambda时出现exec格式错误 - exec format error when running AWS Golang Lambda
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM