场景复现:
在Ubuntu
下的GoLand
中以Debug
模式运行程序。
报错信息:
# runtime/cgo
_cgo_export.c:3:10: fatal error: stdlib.h: 没有那个文件或目录
3 | #include <stdlib.h>
| ^~~~~~~~~~
compilation terminated.
Compilation finished with exit code 2
解决方法:
sudo apt-get install build-essential