douzepao0281 2016-05-23 22:38
浏览 61

安装Appengine SDK之后,Golang未定义google.JWTAccessTokenSourceFromJSON

I installed the Go app engine packages this evening. This seems to have broken my whole Go installation.

Each time I attempt to run any go command, it fails with:

../../../google.golang.org/grpc/credentials/oauth/oauth.go:85: undefined: google.JWTAccessTokenSourceFromJSON

Erm...

I tried nuking the google.golang.org directory without success. When I run go get -x ./... I get the following:

WORK=/var/folders/94/4lkprvq57vj4svwmt_kz5h6m0000gn/T/go-build842729114
mkdir -p $WORK/google.golang.org/grpc/credentials/oauth/_obj/
mkdir -p $WORK/google.golang.org/grpc/credentials/
cd /Users/simon/Documents/Code/golang/src/google.golang.org/grpc/credentials/oauth
/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64/compile -o $WORK/google.golang.org/grpc/credentials/oauth.a -trimpath $WORK -p google.golang.org/grpc/credentials/oauth -complete -buildid 8d03dba436005dd3d1e75147bde330259f288075 -D _/Users/simon/Documents/Code/golang/src/google.golang.org/grpc/credentials/oauth -I $WORK -I /Users/simon/Documents/Code/golang/pkg/darwin_amd64 -pack ./oauth.go
# google.golang.org/grpc/credentials/oauth
../../../google.golang.org/grpc/credentials/oauth/oauth.go:85: undefined: google.JWTAccessTokenSourceFromJSON

Help needed fixing before all sanity gone.

  • 写回答

1条回答 默认 最新

  • duanlaiquan8174 2016-06-21 22:57
    关注

    I ran into this problem as well. I think the go get functionality pulled an outdated repo when updating the Google app engine packages.

    This worked for me:

    cd $GOPATH/src/golang.org/x/oauth2/google
    git fetch 
    git pull
    

    Turns out I was 66 commits behind master; this fixed it for me. Hope it works for you.

    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算