[英]Error: mkdir … The filename, directory name or volume label syntax is incorrect
I am using postgres_exporter
for prometheus
, and when I am trying to run it it shows me an error: 我将postgres_exporter
用于prometheus
,当我尝试运行它时,它向我显示错误:
Error: failed to run "go-bindata -pkg=assets -o assets/bindata.go -ignore=bindata.go -ignore=.*.map$ -prefix=assets/generated assets/generated/...: exec: "go-bindata": executable file not found in %PATH%" exit status 1 错误:无法运行“ go-bindata -pkg =资产-o资产/bindata.go -ignore = bindata.go -ignore =。*。map $-前缀=资产/生成的资产/生成的/ ...:执行: “ go-bindata”:在%PATH%中找不到可执行文件”退出状态1
I realised that I had the wrong library of go-bindata installed. 我意识到我安装了错误的go-bindata库。 So after I installed the other one, error has changed to : 因此,在我安装了另一个后,错误更改为:
Error: mkdir C:\\Users\\StarTech\\go\\src\\github.com\\wrouesnel\\postgres_exporter\\bin/C:: The filename, directory name, or volume label syntax is incorrect. 错误:mkdir C:\\ Users \\ StarTech \\ go \\ src \\ github.com \\ wrouesnel \\ postgres_exporter \\ bin / C ::文件名,目录名或卷标语法不正确。 exit status 1 退出状态1
This is the link of postgres_exporter
: postgres_exporter 这是postgres_exporter
的链接: postgres_exporter
First i type these commands: 首先,我输入以下命令:
go get github.com/wrouesnel/postgres_exporter
cd path/src/github.com/wrouesnel/postgres_exporter
go run mage.go
export DATA_SOURCE_NAME="postgresql://login:password@hostname:port/dbname"
./postgres_exporter <flags>
Also i am using run
command instead of export
since I'm on Windows. 另外,因为我在Windows上,所以我使用run
命令而不是export
。
And error happens when I type command go run mage.go docker
当我键入命令go run mage.go docker
时发生错误
尝试安装go-bindata
:
go get -u github.com/tmthrgd/go-bindata/...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.