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

背景

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去拉取代码和创建文件了的

小结

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

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

时间: 2024-07-30 03:20:20

Export failed for github.com/hashicorp/consul: Unable to export source: exit status 128的相关文章

发布 HashiCorp Consul Helm Chart

SEP 12 2018?MITCHELL HASHIMOTO We're releasing?HashiCorp Consul + Kubernetes?features every week. This week we're releasing the?official Consul Helm Chart?for running and configuring Consul on Kubernetes. Using the Helm chart, you can start a complet

mvn 编译报错mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targ

mavn 编译报错: mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 解决方案: The fact is that your maven plugin try

HashiCorp Consul + Kubernetes深度融合

SEP 05 2018?MITCHELL HASHIMOTO We're excited to announce multiple features that deeply integrate HashiCorp Consul with Kubernetes. This post will share the initial set of features that will be released in the coming weeks. The features include an off

HashiCorp Consul Connect 初探

##什么是Consul Connect? HashiCorp Consul Connect 是 Consul1.2 的新特性,它能够简化网络拓扑和管理,同时增强分布式系统中的安全性并保持高性能. HashiCorp Consul?是一个开源程序,它大大降低了管理和安全解耦.面向服务的体系结构(如微服务)的复杂性.而Consul Connect 特性,使网络管理变得与规模无关,并且您不需要显著修改应用程序来保护传输中的数据.Connect 允许工程师具有更简单的网络拓扑,并可以在分布式应用环境中维

unable to execute 'gcc': No such file or directory error: command 'gcc' failed with exit status 1

推测是找不到gcc,怀疑过去机器gcc未配置好环境变量,于是尝试卸载gcc sudo apt-get remove gcc 此次报错显示需要g++编译,于是安装g++ sudo apt install g++ 之后使用g++代替gcc跑通了编译部分 unable to execute 'gcc': No such file or directory error: command 'gcc' failed with exit status 1 原文地址:https://www.cnblogs.co

MAC OSX 中解决编译“'cc' failed with exit status 1”错误 和clang: error: unknown argument 错误

错误例子: error: command 'cc' failed with exit status 1 clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgraded to a warning) in the fu

安装cx_Oracle时报错:error: command 'gcc' failed with exit status 1

1.安装cx_Oracle 1)下载cx_Oracle,https://pypi.python.org/pypi 2)解压压缩包 3)执行python setup.py install 执行后报错:error: command 'gcc' failed with exit status 1 排查: 1)检查是否安装oracle客户端软件 2)查看当前环境变量中是否配置oracle的相关变量,如echo $ORACLE_HOME 3)如果没有配置需要将oracle环境变量配置到当前用户.bash_

error: command 'cc' failed with exit status 1

报错: Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-kSfBfz/ujson/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, _

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details

thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错 Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details 嗯,看状态 执行命令 systemctl status http