go 项目编译失败

[email protected]:~/sunteng/src/dsp_masky/bin/bid$ go build server.go
# github.com/coreos/go-etcd/etcd
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:99:6: r.EncodeArrayStart undefined (type codec.encDriver has no field or method EncodeArrayStart)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:107:6: r.EncodeMapStart undefined (type codec.encDriver has no field or method EncodeMapStart)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:111:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:119:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:121:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:130:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:142:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:144:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:157:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:170:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
/home/ubuntu/go/src/github.com/coreos/go-etcd/etcd/response.generated.go:170:6: too many errors
# dsp_masky/library/db/shm_index
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_GetLastError’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:52:对‘GetLastError’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_GetVersion’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:69:对‘GetVersion’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashDestroy’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:99:对‘HashDestroy’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashGet’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:119:对‘HashGet’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashHeadToString’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:136:对‘HashHeadToString’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashToString’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:191:对‘HashToString’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_NewHash’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:210:对‘NewHash’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_FreeHash’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:37:对‘FreeHash’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashClean’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:83:对‘HashClean’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashInit’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:150:对‘HashInit’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashRebuild’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:162:对‘HashRebuild’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_HashSet’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:176:对‘HashSet’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/hash.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_SetVersion’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:225:对‘SetVersion’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_IndexError’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:64:对‘IndexError’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_IndexGetTop’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:82:对‘IndexGetTop’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_IndexInit’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:100:对‘IndexInit’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_IndexResize’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:119:对‘IndexResize’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_IndexUpdate’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:151:对‘IndexUpdate’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_NewIndex’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:171:对‘NewIndex’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_NextHash’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:188:对‘NextHash’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_TopHash’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:205:对‘TopHash’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_FreeIndex’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:37:对‘FreeIndex’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_IndexClear’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:49:对‘IndexClear’未定义的引用
/tmp/go-build128556831/dsp_masky/library/db/shm_index/_obj/index.cgo2.o:在函数‘_cgo_74c72ce7a376_Cfunc_IndexSetTop’中:
/tmp/go-build/dsp_masky/library/db/shm_index/_obj/cgo-gcc-prolog:135:对‘IndexSetTop’未定义的引用
collect2: error: ld returned 1 exit status

第一部分错误是github.com/coreos/go-etcd/包版本不对,不能clone master,新版本有较大变动,要clone release-0.4版本

第二部分错误是因为gcc编译失败,因为没有写权限,到gcc文件目录下make就可以看到报错,用root用户先将c++文件编译好再编译go文件即可

时间: 2024-10-14 00:30:02

go 项目编译失败的相关文章

Asp.Net MVC安全更新MS14-059导致项目编译失败

微软最近一次安全更新MS14-059(链接:https://technet.microsoft.com/en-us/library/security/ms14-059)由于直接应用到了machine.config,更新了有关Asp.Net MVC程序集版本的引用,导致引用了GAC的ASP.Net MVC3和4的项目编译出错,错误提示为: "Could not locate the assembly "System.Web.Mvc,Version=4.0.0.0, Culture=neu

Unreal Engine4 C++基础代码项目编译失败原因小结

在Unreal Engine4中创建一个基础代码的项目总是失败 在官网论坛里找了一天的帖子 终于找到原因 是因为目录路径的问题 错误输出: 先清空几个目录路径 可执行文件目录  包含目录 库目录 排除目录 然后全部选择 <从父级或项目默认设置继承> 应用  然后rebuild 搜索 复制

dotnet core项目引用的sdk升级后,项目编译失败

前几天发布了dotnet core 3.1正式版,然后我把之前基于3.0开发的项目升级到3.1后,在用控制台使用dotnet run命令,却出现“当前SDK不支持3.1,请把项目目标框架降到3.0或更早的版本”的报错信息. 第一反应是查看电脑是否已经安装了最新的sdk.在电脑的“卸载或更改程序”中能搜索到3.1的sdk,并且在控制台下用dotnet --info 查看了之后,发现sdk和runtime都是有3.1的.这个时候感觉有点奇怪.使用dotnet --version命令查看版本,是为最新

安卓报错编译失败Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $

昨天还能正常运行,今天打开安卓,发现项目编译失败,还以为是自己的代码有错误啊,后来上网一查才发现这是常见错误,直接build->clean project 就可以解决了. 重新编译之后就会发现问题已经成功解决. Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $ 原文地址:https://www.cnblogs.com/1gaoyu/p/12550030.html

Execution failed for task &#39;:dexDebug&#39; Android Studio 编译失败

刚刚编译android studio的时候,控制台报错,说某某某return 2.... 这个问题的正确解决方法是: 项目对应的build.gradle里面添加的依赖项有问题,只能是删除某个依赖项,然后重新运行知道运行成功为止!! 告诉大家个小窍门,一般都是最后一次添加的依赖项有问题,大家可以从最后一项逐项的注销依赖项,知道运行成功为止. Execution failed for task ':dexDebug' Android Studio 编译失败

Android studio 编译失败Error:Could not read entry &amp;#39;:app:processDebugManifest&amp;#39; from cache taskArtifacts.b

Android studio 编译失败 Error:Could not read entry ':app:processDebugManifest' from cache taskArtifacts.bin 升级了Android studio 2.0 版本号后 编译之前的项目失败 出现了以下提示: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/

64位系统上设置编译平台为x86的项目编译在特定的情况下比如当一个窗体上放有包含了图像的ImageList之后,ResGen就会产生这种问题

随笔 - 1  文章 - 0  评论 - 3 未能加载文件或程序集“****”或它的某一个依赖项.试图加载格式不正确的程序.解决方案总结 当这个ImageList中没有图像时编译也是正常的,但是一旦编译就会引发这样的异常. 这个错误产生的原因在于,VS2010内部使用的编译器中,无论是32位还是64位的编译组件,都是纯IL的,也就是在64位系统中是以64位模式运行,这与当前项目使用的平台设置无关.当编译的组件引用了一个标记为x86的库(仅32位模式)时,编译组件便会发生错误,无法加载,从而导致编

解决AndroidKiller APK 反编译失败,无法继续下一步源码反编译!

报错背景 今天使用AndroidKiller V1.3.1,反编译一个APK,遇到如下报错: 当前 Apktool 使用版本:Android Killer Default APKTOOL 正在反编译 APK,请稍等... >I: 使用 ShakaApktool 2.0.0-20150914 >I: 正在加载资源列表... >I: 反编译 AndroidManifest.xml 与资源... >I: 正在从框架文件加载资源列表: C:\Users\lijie01\apktool\fr

用批处理来自动化项目编译及部署(附Demo)

阅读目录 介绍 详细 处理 结论 Demo下载 介绍 一个项目从立项开始,可能就已经根据公司的配置模板将目录,文档结构定义出来.有动态库,也有静态库,在没有专门的CMO的时候,往往组长,若干开发人员承担版本发布的工作.次工作即枯燥,又容易出错,那么怎么样才能将这样的工作略微自动化点.以下就通过很简单的很古老的批处理来略微自动化下. 详细 一:目录结构 每个公司的目录结构不一样,当略有相同,比如:管理库,需求库,设计库,代码库,引用库(包库),资源库,编译模板库,编译版本库,发布版本库等.如下图: