登录
首页 >  Golang >  Go问答

从源代码下载和安装 Go 编程应用程序的步骤

来源:stackoverflow

时间:2024-02-07 08:09:22 184浏览 收藏

来到golang学习网的大家,相信都是编程学习爱好者,希望在这里学习Golang相关编程知识。下面本篇文章就来带大家聊聊《从源代码下载和安装 Go 编程应用程序的步骤》,介绍一下,希望对大家的知识积累有所帮助,助力实战开发!

问题内容

已经几个小时了,没有任何成功......我正在尝试安装应用程序“siegfried”。 我有一个没有任何互联网接入的 redhat 服务器,为什么我无法运行 wget 或 brew 或类似的东西

wget -qo - https://bintray.com/user/downloadsubjectpublickey?username=bintray | sudo apt-key add -
echo "deb http://dl.bintray.com/siegfried/debian wheezy main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update && sudo apt-get install siegfried

我从下载了源代码

https://github.com/richardlehane/siegfried

我以为我可以构建和安装......简单易行。

我根据本页的说明意识到,我需要go编程编译器

https://github.com/richardlehane/siegfried/wiki/getting-started

我下载了 go 并修复了 $path,go 正在运行。怎么办?我已经下载了源代码,我有 go,现在我需要,我猜构建,或安装或......先构建然后安装。我在这里要疯了。我该如何继续?非常感谢您的建议。

添加: 现在我的 .profile 设置如下:

[madde@m101010 etc]$ echo $path
/opt/apache-maven-3.6.3/bin:/opt/apache-maven-3.6.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/arkiv/bin:/opt/pupal/go/bin:/usr/local/arkiv/bin:/usr/lib/jvm/java/bin:/usr/local/tomcat9:/usr/local/go/bin:/bin:/home/madde/go/bin
[madde@m101010 etc]$ echo $gopath
/home/madde/go
[madde@m101010 etc]$ go version
go version go1.18.2 linux/amd64

仍然得到:

[madde@m101010 siegfried-main]$ go install ./cmd/sf
go: github.com/richardlehane/[email protected]: reading https://proxy.golang.org/github.com/richardlehane/characterize/@v/v1.0.0.mod: 403 Forbidden
go: downloading github.com/richardlehane/characterize v1.0.0
go: downloading github.com/richardlehane/webarchive v1.0.0
go: downloading github.com/richardlehane/mscfb v1.0.4
go: downloading github.com/richardlehane/match v1.0.0
go: downloading golang.org/x/image v0.0.0-20211028202545-6944b10bf410
go: downloading github.com/richardlehane/xmldetect v1.0.2
go: downloading golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
go: downloading github.com/ross-spencer/wikiprov v0.2.0
go: github.com/richardlehane/[email protected]: reading https://proxy.golang.org/github.com/richardlehane/characterize/@v/v1.0.0.mod: 403 Forbidden

正确答案


使用 git 克隆(您想要的存储库/包的链接) 但您必须签入或移动到文件夹 $GOPATH

终于介绍完啦!小伙伴们,这篇关于《从源代码下载和安装 Go 编程应用程序的步骤》的介绍应该让你收获多多了吧!欢迎大家收藏或分享给更多需要学习的朋友吧~golang学习网公众号也会发布Golang相关知识,快来关注吧!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>