dtdh11647 2015-05-27 09:33
浏览 97
已采纳

我真的对导入所需的软件包感到困惑,但是nobuild_files排除了其所有文件

I have latest tools installed, in the app.go I have following imports

"github.com/go-martini/martini"
"github.com/martini-contrib/binding"
"github.com/martini-contrib/render"
"github.com/moovweb/gokogiri"
"github.com/moovweb/gokogiri/xml"

And in app.yaml

application: app
version: 1
runtime: go
api_version: go1

handlers:
- url: /.*
  script: _go_app

I saved external dependencies using godep save tool. But while trying to execute goapp serve command following error occured

SRSLY-2:app bezigon$ goapp serve
INFO     2015-05-27 09:11:22,645 devappserver2.py:745] Skipping SDK update check.
INFO     2015-05-27 09:11:23,048 api_server.py:190] Starting API server at: http://localhost:57449
INFO     2015-05-27 09:11:23,071 dispatcher.py:192] Starting module "default" running at: http://localhost:8080
INFO     2015-05-27 09:11:23,073 admin_server.py:118] Starting admin server at: http://localhost:8000
ERROR    2015-05-27 09:11:24,772 go_runtime.py:180] Failed to build Go application: (Executed command: /Users/bezigon/google-cloud-sdk/platform/google_appengine/goroot/bin/go-app-builder -app_base /Users/bezigon/go/src/github.com/bezigon/app -arch 6 -dynamic -goroot /Users/bezigon/google-cloud-sdk/platform/google_appengine/goroot -nobuild_files ^^$ -unsafe -gopath /Users/bezigon/go -print_extras_hash Godeps/_workspace/src/github.com/moovweb/gokogiri/html/xpath_test.go Godeps/_workspace/src/github.com/martini-contrib/binding/validate_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/attribute.go Godeps/_workspace/src/github.com/martini-contrib/binding/file_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/document_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/util.go Godeps/_workspace/src/github.com/go-martini/martini/logger.go Godeps/_workspace/src/github.com/martini-contrib/binding/misc_test.go Godeps/_workspace/src/github.com/go-martini/martini/response_writer_test.go Godeps/_workspace/src/github.com/codegangsta/inject/inject_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/text.go Godeps/_workspace/src/github.com/go-martini/martini/go_version.go Godeps/_workspace/src/github.com/go-martini/martini/router_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/nodeset.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/xpath_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/xpath.go Godeps/_workspace/src/github.com/martini-contrib/binding/errors.go Godeps/_workspace/src/github.com/moovweb/gokogiri/mem/mem_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/help/help_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/fragment_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/node_test.go Godeps/_workspace/src/github.com/martini-contrib/render/render.go Godeps/_workspace/src/github.com/moovweb/gokogiri/help/help.go Godeps/_workspace/src/github.com/moovweb/gokogiri/mem/mem.go Godeps/_workspace/src/github.com/go-martini/martini/recovery.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/document.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/document.go Godeps/_workspace/src/github.com/moovweb/gokogiri/gokogiri.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/element.go Godeps/_workspace/src/github.com/martini-contrib/binding/errors_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/util/util_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/fragment.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/attribute_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/css/css_test.go Godeps/_workspace/src/github.com/oxtoacart/bpool/bytepool.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/fragment_test.go Godeps/_workspace/src/github.com/martini-contrib/binding/errorhandler_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/utils_test.go Godeps/_workspace/src/github.com/oxtoacart/bpool/bpool.go Godeps/_workspace/src/github.com/moovweb/gokogiri/util/util.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/utils_test.go Godeps/_workspace/src/github.com/go-martini/martini/response_writer.go Godeps/_workspace/src/github.com/moovweb/gokogiri/css/css.go Godeps/_workspace/src/github.com/go-martini/martini/env.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/search_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/gokogiri_test.go Godeps/_workspace/src/github.com/go-martini/martini/static_test.go Godeps/_workspace/src/github.com/codegangsta/inject/inject.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/expression.go Godeps/_workspace/src/github.com/martini-contrib/binding/form_test.go Godeps/_workspace/src/github.com/go-martini/martini/static.go Godeps/_workspace/src/github.com/go-martini/martini/martini.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/fragment.go Godeps/_workspace/src/github.com/martini-contrib/binding/bind_test.go app.go Godeps/_workspace/src/github.com/martini-contrib/render/render_test.go Godeps/_workspace/src/github.com/martini-contrib/binding/binding.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/cdata.go Godeps/_workspace/src/github.com/go-martini/martini/martini_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/node_test.go Godeps/_workspace/src/github.com/oxtoacart/bpool/bufferpool.go Godeps/_workspace/src/github.com/martini-contrib/binding/json_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/util_test.go Godeps/_workspace/src/github.com/go-martini/martini/router.go Godeps/_workspace/src/github.com/martini-contrib/binding/common_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/pi.go Godeps/_workspace/src/github.com/go-martini/martini/logger_test.go Godeps/_workspace/src/github.com/go-martini/martini/recovery_test.go Godeps/_workspace/src/github.com/go-martini/martini/return_handler.go Godeps/_workspace/src/github.com/moovweb/gokogiri/help/util_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/document_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/crash_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/comment.go Godeps/_workspace/src/github.com/martini-contrib/binding/multipart_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/node.go Godeps/_workspace/src/github.com/go-martini/martini/env_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/encoding_test.go)

2015/05/27 12:11:24 go-app-builder: Failed parsing input: package github.com/moovweb/gokogiri/html required, but all its files were excluded by nobuild_files

What should I do?

By the way it looks to https://blog.golang.org/the-app-engine-sdk-and-workspaces-gopath, but I have not found the answer.

UPD: I have added a testcase, check it out https://github.com/bezigon/testcase

  • 写回答

1条回答 默认 最新

  • duanfei9278 2015-05-28 06:42
    关注

    Following link has the answer

    https://groups.google.com/d/msg/google-appengine-go/mGuMV4tVR0U/A3qaCau7zY4J

    Briefly, the reason is

    "cgo" is not supported on classic App Engine. If you want to build your app, you will need to use Go on Managed VMs ("vm: true" in your app.yaml). Please see https://cloud.google.com/appengine/docs/go/managed-vms/ for more information.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘