登录
首页 >  Golang >  Go问答

当它在 Golang 上构建时,消息是什么?

来源:stackoverflow

时间:2024-04-05 11:54:20 468浏览 收藏

从现在开始,努力学习吧!本文《当它在 Golang 上构建时,消息是什么?》主要讲解了等等相关知识点,我会在golang学习网中持续更新相关的系列文章,欢迎大家关注并积极留言建议。下面就先一起来看一下本篇正文内容吧,希望能帮到你!

问题内容

当我在 golang 上构建源代码时,我看到了警告消息,但找不到有关它的答案。

$ go build --mod=mod -o main main.go
# command-line-arguments
ld: warning: -no_pie is deprecated when targeting new OS versions
  • 规格 版本:go版本go1.18 darwin/amd64 操作系统:蒙特利12.6 构建命令: go build --mod=mod -o [二进制名称] main.go

正确答案


来自 github:link

There are a few options:

- wait for the next Go 1.19.x and 1.18.x releases, probably early next month
- build Go from the master branch
- pass -buildmode=pie flag to go build and go test for a workaround
- use older version of the system linker

今天关于《当它在 Golang 上构建时,消息是什么?》的内容就介绍到这里了,是不是学起来一目了然!想要了解更多关于的内容请关注golang学习网公众号!

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