golang-build-error
工程中同时有两个main文件,编译的时候提示:
go build proxy/proxy.go
pb/anti_spam.pb.go::: cannot find package "_/Users/xxx/go/src/git.company.com/aa/bb/vendor/github.com/golang/protobuf/proto" in any of:
/usr/local/Cellar/go/1.10./libexec/src/_/Users/xxx/go/src/git.company.com/aa/bb/vendor/github.com/golang/protobuf/proto (from $GOROOT)
/Users/xxx/go/src/_/Users/xxx/go/src/git.company.com/aa/bb/vendor/github.com/golang/protobuf/proto (from $GOPATH)
这个问题原因在于编译时候找不到包放在哪个位置,
然后系统和项目中不会有"_/Users/xxx" 这样的路径,那么主要问题就是文件导入路径引起的,
查看“proxy/proxy.go ”的源码发现如下引用:
gw "../pb"
由于该相对路径在make编译时候无法找到,将该路径换成 "git.corpautohome.com/gp_mb_ad_engine/pj"
这样的路径重新编译即可解决;
如果您认为本篇解决了问题可尽情打赏;

cost:2
参考:
https://github.com/Masterminds/glide/issues/602#issuecomment-327732992
golang-build-error的更多相关文章
- golang build error: syntax error: nested func not allowed
在笔记本中写了一个简易web程序,但是编译失败,提示“syntax error: nested func not allowed” . 不明白什么意思,幸好代码量小,原来是方法的末尾的“}”丢了! p ...
- sublime text3 golang插件(golang build)
1 前言 先前条件: sublime text3:下载地址:http://www.sublimetext.com/3 golang:下载地址:https://golang.google.cn/dl/ ...
- maven:log4j:WARN No appenders could be found for logger (loggerInfo).或者maven build error:org.apache.maven.lifecycle.LifecycleExecutionExceptio
maven在build构建时,加载资源文件时需要配置资源文件插件: 1,在pom.xml文件中加入 <build> <finalName>${project.build.tar ...
- rpm build error: invalid predicate
rpm build error error message:/usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS find: invali ...
- Build Error 6041: Internal build error
Note: Following content is reprinted from the Original article Flexera : Build Error 6041. Only for ...
- 用VS不同版本打开项目,报错:MS Build Error MSB4019: Microsoft.WebApplication.targets was not found
本例是在用VS2008打开项目是报错 未找到C:\Program Files\MSBuild\Microsoft\VisualStudio\V10.0 In the last article Buil ...
- installsheild2011打包程序internal build error 6213
今天打包一个安装程序,总是出现报错,internal build error -6213,然后搜遍都没有找到什么解决方案.看到一个帖子,说是因为installsheild里面的build的时候自动扫描 ...
- 【转载】Android Gradle Build Error:Some file crunching failed, see logs for details解决办法
Android Gradle Build Error:Some file crunching failed, see logs for details解决办法 转载请标明出处: http://www. ...
- golang开发:Error的使用
Error是Go语言开发中最基础也是最重要的部分,跟其他语言的try catch的作用基本一致,想想在PHP JAVA开发中,try catch 不会使用,或者使用不灵活,就无法感知到程序运行中出现了 ...
- Android Gradle Build Error:Some file crunching failed, see logs for details解决办法
转载请标明出处: http://www.cnblogs.com/why168888/p/5925756.html 本文出自:[Edwin博客园] 错误日志:Error:java.lang.Runtim ...
随机推荐
- iPhoneX && iOS11 适配
最近实在是蛮闲的,这都得益于苹果爸爸给力的审核,已经半个月了(委屈) 这个问题已经很久了,但是还是希望分享给各位,当然网上的教程的确很多: 1.automaticallyAdjustsScrollVi ...
- struts2应用
1.处理表单数据 GreetingAction public class GreetingAction extends ActionSupport{ private String username; ...
- android lombok 使用
把get /set / toString/hash/equal等方法从源文件中简化掉直接编译到二进制文件中 地址https://github.com/rzwitserloot/lombok 一 安装l ...
- linux自动更新代码,自动备份数据库,打包应用发布
切换root用户 sudo su - 1.安装svn,mysql yum install subversion yum install mysql 2.安装 maven 下载:百度云盘地址为 http ...
- 2018ICPC青岛 E - Plants vs. Zombies (二分+模拟)
ZOJ - 4062 题意:有n个植物排成一排,按顺序植物的编号是1-n,每个植物都有一个生长速率,有一个机器人,机器人可以走m步,每走一步,这个机器人就会浇一次水,浇一次水那个植物就会长 自身的生长 ...
- .NET 日期数据的格式化方法
.HtmlEncode="False" .DataFormatString="{0:d}" C#格式化日期时间 DateTime dt = DateTime.N ...
- <Codis><JedisPool><DeadLock>
Overview Background: I start a thread [call thread A below]in Spark driver to handle opening files i ...
- MySQL:数据表基本操作
数据表基本操作 注意点: 1.数据表中已经有数据时,轻易修改数据类型,有可能因为不同的数据类型的数据在机器 中存储的方式及长度并不相同,修改数据类型可能会影响到数据表中已有的数据类型. 2. 数据表 ...
- python scrapy 把cookie并转化为字典的形式
在用scrapy设置cookie的时候,需要从网页上对应的页面把cookie字段复制下来,并转化为字典的形式,下面代码是对cookie的转化过程 # -*- coding: utf-8 -*- cla ...
- springBoot AOP学习(一)
AOP学习(一) 1.简介 AOp:面向切面编程,相对于OOP面向对象编程. Spring的AOP的存在目的是为了解耦.AOP可以让一切类共享相同的行为.在OOP中只能通过继承类或者实现接口,使代码的 ...