猿问

Google Go HelloWorld教程错误了

从以下内容开始研究Google Go HelloWorld教程:


https://developers.google.com/appengine/docs/go/gettingstarted/helloworld


在MacBook Pro上使用OS X 10.8.2。


遵循了步骤,但是当我运行第一个代码(dev_appserver.py myapp /)时,出现问题末尾列出的错误。


这是你好世界程序:


package hello


import (

    "fmt"

    "net/http"

)


func init() {

    http.HandleFunc("/", handler)

}


func handler(w http.ResponseWriter, r *http.Request) {

    fmt.Fprint(w, "Hello, world!")

}

这是配置文件:


application: helloworld

version: 1

runtime: go

api_version: go1

处理程序:


- url: /.*

  script: _go_app

在stackoverflow上进行过Google搜索和搜索,但未找到解决方案。


如果您有任何想法/建议,请告诉我。


Last login: Sun Oct 14 13:05:37 on ttys000

derek-etnyres-macbook-pro-2:~ dereketnyre$ dev_appserver.py myapp/

WARNING  2012-10-14 18:19:54,239 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.

Warning: You are using a Python runtime (2.7) that is more recent than the production runtime environment (2.5). Your application may use features that are not available in the production environment and may not work correctly when deployed to production.

CRITICAL 2012-10-14 18:19:54,686 appcfg.py:562] The api_version specified in app.yaml (go1) is not supported by this release of the SDK.  The supported api_versions are ['1'].


天涯尽头无女友
浏览 181回答 2
2回答
随时随地看视频慕课网APP

相关分类

Go
我要回答