无法从github安装C4的cmd版本 [英] Not able to install cmd version of c4 from github

查看:83
本文介绍了无法从github安装C4的cmd版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为文件生成 sha512 密钥,当我通过互联网查看时,我发现 c4 可以帮助我完成该任务,而当我打开它的github存储库时我并不怀疑如何在ubuntu终端中运行 cmd/c4 .我已经在系统中安装了 go ,并且在克隆此 repo https://github.com/Avalanche-io/c4.git 转到路径 cmd/c4 ,除了五个 go 文件

I want to generate sha512 key for a file, When I looked through internet I found that c4 can help me to do that thing and when I open it's github repository I am not ablke to found how can I run the cmd/c4 in my ubuntu terminal. I have installed the go in my system and when I clone this repo https://github.com/Avalanche-io/c4.git And went to path cmd/c4 there is no make file present except five go files which are

  1. flags.go
  2. id.go
  3. main.go
  4. output.go
  5. walker.go 我无法在我的 ubuntu 系统中实现 c4 cmd 版本.请帮忙.正如答案之一告诉我要运行此命令 go github.com/Avalanche-io/c4/cmd/c4 那样,它不会产生任何错误,但如答案中所述<代码>现在您可以将c4用作命令,但这没有发生.当我使用 c4 时,ubuntu表示命令c4无法识别.所以现在我只需在PC中克隆给定的 repo ,然后在 repo 内部运行命令 go get *
  1. flags.go
  2. id.go
  3. main.go
  4. output.go
  5. walker.go I am not able to implement this cmd version of c4 in my ubuntu system. Please help. As one of the answer has told me to run this command go get github.com/Avalanche-io/c4/cmd/c4 I have done this it not producing any error but as written in the answer now you can use c4 as command but it's not happening. When I use c4 ubuntu says command c4 not recognized. So now I just clone the given repo in the pc and then run the command go get * so inside the repo so it was giving following error.

package CODE_OF_CONDUCT.md: unrecognized import path "CODE_OF_CONDUCT.md" (https fetch: Get https://CODE_OF_CONDUCT.md/?go-get=1: dial tcp: lookup CODE_OF_CONDUCT.md: no such host)
package CONTRIBUTORS: unrecognized import path "CONTRIBUTORS" (import path does not begin with hostname)
package db: unrecognized import path "db" (import path does not begin with hostname)
package doc.go: unrecognized import path "doc.go" (https fetch: Get https://doc.go/?go-get=1: dial tcp: lookup doc.go: no such host)
package id: unrecognized import path "id" (import path does not begin with hostname)
package id.go: unrecognized import path "id.go" (https fetch: Get https://id.go/?go-get=1: dial tcp: lookup id.go: no such host)
package id_test.go: unrecognized import path "id_test.go" (https fetch: Get https://id_test.go/?go-get=1: dial tcp: lookup id_test.go: no such host)
package internals_test.go: unrecognized import path "internals_test.go" (https fetch: Get https://internals_test.go/?go-get=1: dial tcp: lookup internals_test.go: no such host)
package LICENSE: unrecognized import path "LICENSE" (import path does not begin with hostname)
package manifest: unrecognized import path "manifest" (import path does not begin with hostname)
package README.md: unrecognized import path "README.md" (parse https://README.md/?go-get=1: no go-import meta tags ())
package store: unrecognized import path "store" (import path does not begin with hostname)
package tree.go: unrecognized import path "tree.go" (https fetch: Get https://tree.go/?go-get=1: dial tcp: lookup tree.go: no such host)
package treeslice_bench_test.go: unrecognized import path "treeslice_bench_test.go" (https fetch: Get https://treeslice_bench_test.go/?go-get=1: dial tcp: lookup treeslice_bench_test.go: no such host)
package tree_test.go: unrecognized import path "tree_test.go" (https fetch: Get https://tree_test.go/?go-get=1: dial tcp: lookup tree_test.go: no such host)
package util: unrecognized import path "util" (import path does not begin with hostname)

推荐答案

要安装go可编译命令,只需获取它们即可:

To install go compilable commands, you just go get them:

go get github.com/Avalanche-io/c4/cmd/c4

这将产生"c4".您的GOPATH/bin中的二进制文件.

This will produce the "c4" binary in your GOPATH/bin.

如果您没有配置它,或将其添加到PATH变量中,则可以按以下方式运行它:

If you did not configure this, or add it to your PATH variable, you can run it as:

~/go/bin/c4

否则,它就在您的路径中,您可以将其作为"c4"运行.

Otherwise it's in your path, and you can just run it as "c4".

有关如何配置与Golang相关的路径的指南,请在此处查看:

For a guide on how to configure paths related to Golang, take a look here: How do I SET the GOPATH environment variable on Ubuntu? What file must I edit?

这篇关于无法从github安装C4的cmd版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆