cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH

1 개요[ | ]

Console
Copy
root@testuser:~/go/src/hello# go test .
# runtime/cgo
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH
FAIL    github.com/jmnote/hello [build failed]
FAIL
Console
Copy
root@testuser:~/go/src/hello# apt-get install build-essential
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
...
Setting up libheif-plugin-aomenc:amd64 (1.17.6-1ubuntu4.1) ...
Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
Processing triggers for man-db (2.12.0-4build2) ...
Console
Copy
root@testuser:~/go/src/hello# go test .
ok      github.com/jmnote/hello       0.006s

2 같이 보기[ | ]

3 참고[ | ]