hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.06k stars 3.32k forks source link

Install packer source code with go failing #5983

Closed srikgali closed 6 years ago

srikgali commented 6 years ago

I am trying to install packer from source code with golang. but i am not able to create packer binary. can you help me with step by step procedure to install packer with golang?

I have followed below link to install packer https://www.packer.io/docs/install/index.html#compiling-from-source

Error: [root@hostname packer]# make dev /usr/local/go/pkg/tool/linux_amd64/link: signal: killed make: *** [dev] Error 1

Error if i run just make: [root@hostname packer]# make go generate . 2018/03/06 22:25:37 Generated command/plugin.go gofmt -w command/plugin.go /root/go_projects/src/github.com/hashicorp/packer/scripts/gofmtcheck.sh $(find . -not -path "./vendor/" -name ".go") ==> Checking that code complies with gofmt requirements... Check passed. /usr/local/go/pkg/tool/linux_amd64/link: signal: killed FAIL github.com/hashicorp/packer [build failed] ok github.com/hashicorp/packer/builder/alicloud/ecs (cached) ok github.com/hashicorp/packer/builder/amazon/chroot (cached) ok github.com/hashicorp/packer/builder/amazon/common (cached) ok github.com/hashicorp/packer/builder/amazon/ebs (cached) ok github.com/hashicorp/packer/builder/amazon/ebssurrogate (cached) ok github.com/hashicorp/packer/builder/amazon/ebsvolume (cached) ok github.com/hashicorp/packer/builder/amazon/instance (cached) ok github.com/hashicorp/packer/builder/azure/arm 1.241s ok github.com/hashicorp/packer/builder/azure/common (cached) ? github.com/hashicorp/packer/builder/azure/common/constants [no test files] ? github.com/hashicorp/packer/builder/azure/common/lin [no test files] ? github.com/hashicorp/packer/builder/azure/common/logutil [no test files] ok github.com/hashicorp/packer/builder/azure/common/template 0.021s ok github.com/hashicorp/packer/builder/azure/pkcs12 (cached) ok github.com/hashicorp/packer/builder/azure/pkcs12/rc2 (cached) ok github.com/hashicorp/packer/builder/cloudstack (cached) ok github.com/hashicorp/packer/builder/digitalocean (cached) ok github.com/hashicorp/packer/builder/docker (cached) ok github.com/hashicorp/packer/builder/file (cached) ok github.com/hashicorp/packer/builder/googlecompute 2.691s ok github.com/hashicorp/packer/builder/hyperv/common (cached) ok github.com/hashicorp/packer/builder/hyperv/iso 0.049s ok github.com/hashicorp/packer/builder/hyperv/vmcx 0.036s ok github.com/hashicorp/packer/builder/lxc 0.007s ok github.com/hashicorp/packer/builder/lxd (cached) ok github.com/hashicorp/packer/builder/ncloud (cached) ok github.com/hashicorp/packer/builder/null (cached) ok github.com/hashicorp/packer/builder/oneandone (cached) ok github.com/hashicorp/packer/builder/openstack 0.054s ok github.com/hashicorp/packer/builder/oracle/classic (cached) ? github.com/hashicorp/packer/builder/oracle/common [no test files] ok github.com/hashicorp/packer/builder/oracle/oci (cached) ok github.com/hashicorp/packer/builder/oracle/oci/client (cached) ok github.com/hashicorp/packer/builder/parallels/common 2.519s ok github.com/hashicorp/packer/builder/parallels/iso 0.026s ok github.com/hashicorp/packer/builder/parallels/pvm 0.008s ok github.com/hashicorp/packer/builder/profitbricks (cached) ok github.com/hashicorp/packer/builder/qemu 0.025s ok github.com/hashicorp/packer/builder/scaleway (cached) ok github.com/hashicorp/packer/builder/triton (cached) ok github.com/hashicorp/packer/builder/virtualbox/common 5.540s ok github.com/hashicorp/packer/builder/virtualbox/iso 0.023s ok github.com/hashicorp/packer/builder/virtualbox/ovf 0.011s ok github.com/hashicorp/packer/builder/vmware/common 5.167s ok github.com/hashicorp/packer/builder/vmware/iso 0.045s ok github.com/hashicorp/packer/builder/vmware/vmx 0.009s /usr/local/go/pkg/tool/linux_amd64/link: signal: killed FAIL github.com/hashicorp/packer/command [build failed] ok github.com/hashicorp/packer/common 0.102s ok github.com/hashicorp/packer/common/json (cached) [no tests to run] ok github.com/hashicorp/packer/common/powershell 0.005s ? github.com/hashicorp/packer/common/powershell/hyperv [no test files] ? github.com/hashicorp/packer/common/ssh [no test files] ok github.com/hashicorp/packer/common/uuid (cached) ok github.com/hashicorp/packer/communicator/none (cached) ok github.com/hashicorp/packer/communicator/ssh (cached) ok github.com/hashicorp/packer/communicator/winrm (cached) ok github.com/hashicorp/packer/fix (cached) ok github.com/hashicorp/packer/helper/builder/testing (cached) ok github.com/hashicorp/packer/helper/communicator (cached) ok github.com/hashicorp/packer/helper/config (cached) ? github.com/hashicorp/packer/helper/enumflag [no test files] ok github.com/hashicorp/packer/helper/flag-kv 0.003s ok github.com/hashicorp/packer/helper/flag-slice (cached) ok github.com/hashicorp/packer/helper/multistep (cached) ok github.com/hashicorp/packer/packer 0.296s ok github.com/hashicorp/packer/packer/plugin 0.275s ok github.com/hashicorp/packer/packer/rpc (cached) ok github.com/hashicorp/packer/plugin/example (cached) [no tests to run] ? github.com/hashicorp/packer/post-processor/alicloud-import [no test files] ? github.com/hashicorp/packer/post-processor/amazon-import [no test files] ok github.com/hashicorp/packer/post-processor/artifice (cached) [no tests to run] ok github.com/hashicorp/packer/post-processor/atlas (cached) ok github.com/hashicorp/packer/post-processor/checksum 0.012s ok github.com/hashicorp/packer/post-processor/compress 0.035s ok github.com/hashicorp/packer/post-processor/docker-import (cached) ok github.com/hashicorp/packer/post-processor/docker-push (cached) ok github.com/hashicorp/packer/post-processor/docker-save (cached) ok github.com/hashicorp/packer/post-processor/docker-tag (cached) ok github.com/hashicorp/packer/post-processor/googlecompute-export (cached) [no tests to run] ? github.com/hashicorp/packer/post-processor/manifest [no test files] ok github.com/hashicorp/packer/post-processor/shell-local 0.039s ok github.com/hashicorp/packer/post-processor/vagrant 0.054s ok github.com/hashicorp/packer/post-processor/vagrant-cloud (cached) ok github.com/hashicorp/packer/post-processor/vsphere (cached) ? github.com/hashicorp/packer/post-processor/vsphere-template [no test files] ok github.com/hashicorp/packer/provisioner (cached) ok github.com/hashicorp/packer/provisioner/ansible 0.109s ok github.com/hashicorp/packer/provisioner/ansible-local (cached) ok github.com/hashicorp/packer/provisioner/chef-client (cached) ok github.com/hashicorp/packer/provisioner/chef-solo (cached) ok github.com/hashicorp/packer/provisioner/converge (cached) ok github.com/hashicorp/packer/provisioner/file (cached) ok github.com/hashicorp/packer/provisioner/powershell (cached) ok github.com/hashicorp/packer/provisioner/puppet-masterless (cached) ok github.com/hashicorp/packer/provisioner/puppet-server (cached) ok github.com/hashicorp/packer/provisioner/salt-masterless (cached) ok github.com/hashicorp/packer/provisioner/shell (cached) ok github.com/hashicorp/packer/provisioner/shell-local (cached) ok github.com/hashicorp/packer/provisioner/windows-restart (cached) ok github.com/hashicorp/packer/provisioner/windows-shell (cached) ? github.com/hashicorp/packer/scripts [no test files] ok github.com/hashicorp/packer/template 0.020s ok github.com/hashicorp/packer/template/interpolate (cached) ? github.com/hashicorp/packer/version [no test files] make: *** [test] Error 1

Any comments?

mwhooker commented 6 years ago

you're probably running out of memory. see https://github.com/hashicorp/packer/issues/5585

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.