david on Nostr: ...
如果系统上没有安装gcc等基础库等话,go的CGO_ENABLED默认会是false的. 这样一些依赖于cgo的库就无法正常编译.
解决方法: 根据发行版来安装gcc make等依赖.
go env命令可以查看go 编译器的环境变量,排查问题.
#go #devlog
Published at
2023-09-11 11:21:04Event JSON
{
"id": "5daeffcb67975394f2b5e42ff6777251237c4d37255059121b6641d0579813f4",
"pubkey": "e9eac471d33e709418c268e9d6e9989384b319fbe789010dcf674071e9d4d6bb",
"created_at": 1694431264,
"kind": 1,
"tags": [
[
"t",
"go"
],
[
"t",
"devlog"
]
],
"content": "如果系统上没有安装gcc等基础库等话,go的CGO_ENABLED默认会是false的. 这样一些依赖于cgo的库就无法正常编译.\n解决方法: 根据发行版来安装gcc make等依赖.\n\ngo env命令可以查看go 编译器的环境变量,排查问题.\n#go #devlog",
"sig": "96da1dac5d16c9f996fd91739464bb6a0ab1c42a79832051022331da04cd41294cf207281b54b056ebd4a9875740ab0c805baa190e2769a946a5bd83228e3d11"
}