码迷,mamicode.com
首页 > 其他好文 > 详细

Export failed for github.com/hashicorp/consul: Unable to export source: exit status 128

时间:2019-05-10 20:21:46      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:ica   失败   ber   vertica   tps   ike   use   方法   f11   

背景 

go项目,使用glide install命令去下载安装依赖,依赖中有个github.com/hashicorp/consul

 

问题描述

一直无法下载安装依赖成功,报错如下:

 

[ERROR] Export failed for github.com/hashicorp/consul: Unable to export source: exit status 128
[ERROR] Unable to export dependencies to vendor directory: Unable to export source: exit status 128

 

解决思路

先日了狗表达心情!

一顿google,发现提供的思路都差不多为:

 

glide cc

rm -rf vendor

尝试了无数次后都是失败了

在google的过程中,有的人建议贴出debug日志,无奈最后就自己加上了debug日志,得到了如下

 

具体日志

 

[ERROR] Export failed for github.com/hashicorp/consul: Unable to export source: exit status 128

[DEBUG] Output was: error: unable to create file C:\\\Users\\\M\\\AppData\\\Local\\\Temp\\\glide-vendor249536483\\\vendor\\\github.com\\\hashicorp\\\consul\\\vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go: Filename too long[DEBUG]

Unlocking https-github.com-hashicorp-consul

[ERROR] Unable to export dependencies to vendor directory: Unable to export source: exit status 128

[DEBUG] Output was: error: unable to create file C:\\\Users\\\M\\\AppData\\\Local\\\Temp\\\glide-vendor249536483\\\vendor\\\github.com\\\hashicorp\\\consul\\\vendor/github.com/hashicorp/go-discover/provider/azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go: Filename too long

日了狗,看描述大概明白了,glide在执行新建文件的时候发现文件名过长了!!!

 

解决办法

那么问题就演变成了glide error filename too long的问题了

具体方法:

 

Enable long paths on Windows (requires Windows 10 Anniversary Update or newer): https://superuser.com/a/1119980/97078

Configure git to use long paths: git config --global core.longpaths true (globally) or git config core.longpaths true (per project)

我执行了第二步就解决了问题,那么大概就是glide 会去使用git去拉取代码和创建文件了的 

 

小结

还是问题的官方日志靠谱,遇到问题先获取更多的日志吧

 

 

Export failed for github.com/hashicorp/consul: Unable to export source: exit status 128

标签:ica   失败   ber   vertica   tps   ike   use   方法   f11   

原文地址:https://www.cnblogs.com/jwentest/p/10846512.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!