dongmimeng5500 2015-03-09 02:59
浏览 32
已采纳

导入对象是预期的Golang 1.4.2中的错误

I have just upgraded Golang from 1.3 to version 1.4.2. And cannot compile due to error:

../../my/mandrill.go:5: import /path/to/go/home/pkg/darwin_amd64/github.com/keighl/mandrill.a: object is [darwin amd64 go1.3.3 X:precisestack] expected [darwin amd64 go1.4.2 X:precisestack]
FAIL    folder [build failed]

on line m "github.com/keighl/mandrill"

package my

import (
    "fmt"
    m "github.com/keighl/mandrill"
)

I guess some rules of importing have changed in 1.4.2. But cannot figure out how to change my import code to make it compile.

  • 写回答

2条回答 默认 最新

  • dongya1875 2015-03-09 04:02
    关注

    Just delete the old pkg files, usually it upgrades automatically though.

    rm -rf $GOPATH/pkg/
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器