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

1 개요[ | ]

cgo: exec gcc: exec: "gcc": executable file not found in $PATH
root@localhost:~/go/src/github.com/jmnote/hello-gin# go run .
go: downloading github.com/google/uuid v1.2.0
go: downloading gorm.io/gorm v1.21.8
go: downloading github.com/gin-gonic/gin v1.6.3
go: downloading gorm.io/driver/sqlite v1.1.4
...
go: downloading github.com/go-playground/locales v0.13.0
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in $PATH
root@localhost:~/go/src/github.com/jmnote/hello-gin# go run .
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in $PATH

2 조치[ | ]

apt update
apt install gcc # 또는 apt install build-essential
root@localhost:~/go/src/github.com/jmnote/hello-gin# go run .
...
[GIN-debug] Listening and serving HTTP on :3000

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}