2022-11-17  2024-09-18    56 字  1 分钟

使用golang编译程序遇到的问题

1# runtime/cgo
2/usr/bin/ld: cannot find -lpthread
3collect2: error: ld returned 1 exit status

pthread primitives are part of the core libc.so library. to satisfy -lpthread, create an empty AR archive somewhere in the library search path.

1ar -rc /usr/lib/libpthread.a

除另有声明外本博客文章均采用 知识共享 (Creative Commons) 署名 4.0 国际许可协议 进行许可转载请注明原作者与文章出处