无法在 ubuntu 18.04 中安装 golangci-lint

无法在 ubuntu 18.04 中安装 golangci-lint

在我的 Ubuntu 18.04 中安装 vim-go 但按照步骤操作时出现错误,如下所示:-

vim-go: Error installing github.com/golangci/golangci-lint/cmd/golangci-lint@master: go: found github.com/golangci/golangci-lint/cmd/golangci-lint in github.com/golangci/golangci-lint v1.27.1-0.20200518075657-2c45244db801
vim-go: # github.com/golangci/golangci-lint/cmd/golangci-lint
vim-go: /mnt/d/go/pkg/tool/linux_amd64/link: running gcc failed: exec: "gcc": executable file not found in $PATH
vim-go: 
vim-go: installing finished!
Press ENTER or type command to continue

我该如何修复这个错误?其他一切正常。

答案1

您需要安装 gcc 编译器。打开终端并执行以下命令来安装开发库。

sudo apt-get install build-essential

相关内容