英文:
go install github.com/dmacvicar/terraform-provider-libvirt@latest - shows error
问题
我正在尝试使用Terraform在KVM上创建虚拟机。
安装过程中的一步是通过以下命令下载和安装提供程序:
go install github.com/dmacvicar/terraform-provider-libvirt@latest
但是出现了错误:
提供命名包的模块的go.mod文件包含一个或多个替换指令。它不能包含导致其与主模块解释方式不同的指令。
我没有找到解决办法,有人遇到过这个问题吗?
谢谢。
英文:
I am trying to Provision VMs on KVM with Terraform.
one of the steps in installations is to download and install the provider buy the command:
go install github.com/dmacvicar/terraform-provider-libvirt@latest
but it errors:
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module.
I didn't find a solution, is someone has faced it?
thank you
答案1
得分: 11
根据JimB在评论中的提醒:
如果模块中有替换或排除指令,正确的安装方法是克隆源代码并进行安装,
git clone github.com/dmacvicar/terraform-provider-libvirt
cd terraform-provider-libvirt
go install
英文:
As JimB notice in comments:
> If there are replace or exclude directives in the module, the correct
> installation method is to clone the source and install it,
git clone github.com/dmacvicar/terraform-provider-libvirt
cd terraform-provider-libvirt
go install
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论