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 ...
随机推荐
- UIScrollview的 约束 contentsize contentoffset contentinset layoutsubviews needlayout等影响布局的属性
很久没有写视图布局,最近发现写布局很不顺手,总结一下在处理UIScrollview的时候种种注意事项: 1. self.automaticallyAdjustsScrollViewInsets = N ...
- Qt简单项目--加法计算器(详细代码注释)
Qt的简单案例--加法计算器(详细代码注释) 一.项目结构 二.项目代码 widget.h #ifndef WIDGET_H #define WIDGET_H //预编译指令, 为了避免头文件被重复包 ...
- sptring boot 修改默认Banner
一.自定义banner 启动Spring Boot项目时,在控制台或日志中会默认显示一个Banner,如图所示: 在我们的项目中更希望使用自己的Banner,这样看起来更帅写,但是这对于程序员来说并不 ...
- Linux文件系统命令 cat
命令名:cat 功能:在当前窗口中查看制定位置的文件的内容. eg: renjg@renjg-HP-Compaq-Pro--MT:~/test$ cat /etc/apache2/ports.conf ...
- 程序包需要 NuGet 客户端版本“XXXXX”或更高版本,但当前的 NuGet 版本为“XXXXXXXXXX”
工具 - 扩展和更新- visual studio 库
- uniDAC 7.2.14直联sqlite存在问题
用最新的uniDAC 7.2.14,设置Direct=True,直联sqlite数据库,发现Release状态下出错,Debug没有问题. 改成Direct=False,则没有问题. 警告! 各 ...
- git命令学习
git init:把当前目录变成Git可以管理的仓库git add file:把文件添加到仓库git commit -m "描述语句":把文件提交到仓库git status:该命令 ...
- 3d的 一些公式
1. 3d围绕 z轴旋转 x,y 变换公式: // α β x = r cosα y = r sinα x' = r cos (α+β) y' = r sin (α+β) x' = r (cosα c ...
- REST是什么?
REST -- REpresentational State Transfer 直接翻译:表现层状态转移. @Ivony 老师的一句话概括很精辟: 用URL定位资源,用HTTP动词(GET,POS ...
- SQL注入之Sqli-labs系列第二关
废话不在多说 let's go! 继续挑战第二关(Error Based- Intiger) 同样的前奏,就不截图了 ,and 1=1和and 1=2进行测试,出现报错 还原sql语句 查看源代 ...