Go软件包安装问题:没有安装位置

我正在尝试构建包装器,但是出现以下错误,我不确定该如何解决。 </ p>

 进行安装:_ / home / vagrant / packer / builder / amazon / chroot 
go安装:无安装位置_ / home / vagrant / packer / builder / amazon / common
go安装:_ / home / vagrant / packer / builder / amazon / ebs
go安装没有安装位置:_ / home / vagrant / packer / builder / amazon / instance
go安装没有安装位置 :_ / home / vagrant / packer / builder / digitalocean
go安装的无安装位置:_ / home / vagrant / packer / builder / openstack
go安装的无安装位置:_ / home / vagrant / packer的无安装位置 / builder / virtualbox
go安装:_ / home / vagrant / packer / builder / vmware
go安装的无安装位置:_ / home / vagrant / packer / command / build
go安装的无安装位置: _ / home / vagrant / packer / command / fix
go安装:_ / home / vagrant / packer / command / inspect
go安装:无安装位置_ / home / vagrant / packer / packer / command / validate \ ngo install:_ / home / vagrant / pac没有安装位置 ker / common
go安装:_ / home / vagrant / packer / common / command
go安装没有安装位置:_ / home / vagrant / packer / common / json
go安装没有安装位置:_ / home / vagrant / packer / communicator / ssh
go安装:_ / home / vagrant / packer / packer
go安装没有安装位置:_ / home / vagrant / packer / packer / packer / plugin
go安装没有安装位置: 没有_ / home / vagrant / packer / packer / rpc
go安装的安装位置:没有_ / home / vagrant / packer / packer / post-processor / vagrant
go安装的安装位置:_ / home / vagrant / packer / provisioner / chef-solo
go安装:_ / home / vagrant / packer / provisioner / file
go安装没有安装位置:_ / home / vagrant / packer / provisioner / puppet-masterless
go安装没有安装位置 :_ / home / vagrant / packer / provisioner / salt-masterless
go安装没有安装位置:_ / home / vagrant / packer / provisioner / shell
make没有安装位置:*** [全部]错误1
</ code> </ pre>

我尝试添加AF 上面的目录中有一些到我的GOPATH,但是仍然得到上面所有相同的错误。</ p>

  $ echo $ GOPATH 
/ home / vagrant / packer:/ home / vagrant / packer / builder / amazon / chroot
</ code> </ pre>
</ div>

展开原文

原文

I'm trying to build packer from source on ubuntu, but getting the following errors which I'm unsure how to resolve.

go install: no install location for _/home/vagrant/packer/builder/amazon/chroot
go install: no install location for _/home/vagrant/packer/builder/amazon/common
go install: no install location for _/home/vagrant/packer/builder/amazon/ebs
go install: no install location for _/home/vagrant/packer/builder/amazon/instance
go install: no install location for _/home/vagrant/packer/builder/digitalocean
go install: no install location for _/home/vagrant/packer/builder/openstack
go install: no install location for _/home/vagrant/packer/builder/virtualbox
go install: no install location for _/home/vagrant/packer/builder/vmware
go install: no install location for _/home/vagrant/packer/command/build
go install: no install location for _/home/vagrant/packer/command/fix
go install: no install location for _/home/vagrant/packer/command/inspect
go install: no install location for _/home/vagrant/packer/command/validate
go install: no install location for _/home/vagrant/packer/common
go install: no install location for _/home/vagrant/packer/common/command
go install: no install location for _/home/vagrant/packer/common/json
go install: no install location for _/home/vagrant/packer/communicator/ssh
go install: no install location for _/home/vagrant/packer/packer
go install: no install location for _/home/vagrant/packer/packer/plugin
go install: no install location for _/home/vagrant/packer/packer/rpc
go install: no install location for _/home/vagrant/packer/post-processor/vagrant
go install: no install location for _/home/vagrant/packer/provisioner/chef-solo
go install: no install location for _/home/vagrant/packer/provisioner/file
go install: no install location for _/home/vagrant/packer/provisioner/puppet-masterless
go install: no install location for _/home/vagrant/packer/provisioner/salt-masterless
go install: no install location for _/home/vagrant/packer/provisioner/shell
make: *** [all] Error 1

I've tried adding a few of the above directories to my GOPATH, but still get all the same errors above.

$ echo $GOPATH 
/home/vagrant/packer:/home/vagrant/packer/builder/amazon/chroot

1个回答



GOPATH不能像您假设的那样工作:它不是 not </ em>路径列表,用于查找您的代码 在尝试构建您Go工作区的路径。 请先阅读 http://golang.org/doc/code.html#Organization 。 您的GOPATH 必须</ em>必须包含 src </ code>, bin </ code>和 pkg </ code>目录,否则它不是工作空间。</ p>

错误消息试图告诉您的内容:GOPATH下没有 pkg </ code>目录,因此go工具无法安装它试图构建的内容。</ p>

</ div>

展开原文

原文

GOPATH does not work like you assume: It is not a list of paths to look for your code you are trying to build but a path to your Go workspace. Please read http://golang.org/doc/code.html#Organization first. Your GOPATH must contain src, bin and pkg directories, otherwise it is not a workspace.

What the error message is trying to tell you: There is no pkg directory under your GOPATH, so the go tool cannot install what it is trying to build.

立即提问
相关内容推荐