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 ...
随机推荐
- 外部点击链接,登陆后,直接跳转到该链接(过滤器 + Cookie实现)
一.web.xml (1)指定过滤的Servlet类 (2)配置过滤规则,过滤以.mail结尾的链接 <?xml version="1.0" encoding="U ...
- 如何实时查看Linux下日志
以下以Tomcat为例子,其他WEB服务器目录自己灵活修改即可: 1.先切换到:cd usr/local/tomcat5/logs2.tail -f catalina.out3.这样运行时就可以实时查 ...
- php ,session 详解.
session是根据php.ini中的配置, 存储在 服务器端 ; 生成的sessionId ,也是根据 php.ini 的配置 存储在 客户端cookie中. session的设置: 存储方式:se ...
- 用户登陆代码py
实现用户输入用户名和密码,当用户名为 seven 且 密码为 123 时,显示登陆成功,否则登陆失败! 实现用户输入用户名和密码,当用户名为 seven 且 密码为 123 时,显示登陆成功,否则登陆 ...
- 一种基于SDR实现的被动GSM嗅探
软件定义无线电(SDR)是一种无线电通信系统,简单来说,就是通过数字信号处理技术在通用可编程数字信号处理硬件平台上,利用软件定义来实现无线电台的各单元功能,从而对无线电信号进行调制.解调.测量.SDR ...
- foreman源NO_PUBKEY 6F8600B9563278F6
/etc/apt/sources.list.d/foreman.list # foreman deb http://deb.theforeman.org xenial stable 一条命令解决 ap ...
- SQL server类型转换
1. CAST函数 语法: CAST ( expression AS data_type [ ( length ) ] ) | | | |关键字 表达式或值 要转换成的数据类型 最大长度 示例: SE ...
- MySQL笔记(2)
SQL 的约束 约束是一种限制,它通过对表的行或列的数据做出限制,来确保表的数据的完整性.唯一性.. 1 约束分类 约束是一种限制,它通过对表的行或列的数据做出限制,来确保表的数据的完整性.唯一性. ...
- Refused to execute inline event handler because it violates the following Content Security Policy directive: "xxx". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...')
/********************************************************************************* * Refused to exec ...
- mysql手动设置数据表的自增值
设置表tablename的自增值从1开始自增值 alter table tablename auto_increment=1;