Don't know why packer init is failing in my mac osx. It worked well on my 
Debian machine. I'm on version 1.8.6

This is what I am getting:
Failed getting the "github.com/hashicorp/amazon" plugin:
19 errors occurred:
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_netbsd_arm.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_openbsd_amd64.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_linux_386.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_windows_amd64.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_linux_arm.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_linux_arm64.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_freebsd_amd64.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_freebsd_arm.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_netbsd_386.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_netbsd_amd64.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_freebsd_386.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_windows_386.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_solaris_amd64.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_openbsd_arm.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_linux_amd64.zip: wrong system, expected 
darwin_amd64
* Checksums (*sha256.digest) did not match.
Expected: d86025aef6050899388d1d3975dc730e4b359d4b02a81419932c0dae9ef0c37e
Got     : 358028e6fc0866c67b85ce712b48ca9cf2cc4b6b921e7be9f7e85481761625b9
. Is the checksum file correct ? Is the binary file correct ?
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_darwin_arm64.zip: wrong system, expected 
darwin_amd64
* ignoring invalid remote binary 
packer-plugin-amazon_v1.2.4_x5.0_openbsd_386.zip: wrong system, expected 
darwin_amd64
* could not install any compatible version of plugin 
"github.com/hashicorp/amazon"

This is the content of my hcl file. Do you see anything wrong?
packer {
required_plugins {
amazon = {
version = ">= 1.2.4"
source = "github.com/hashicorp/amazon"
}
}
}

locals {
timestamp = regex_replace(timestamp(), "[- TZ:]", "")
}

source "amazon-ebs" "nodejs" {
ami_name = "example-nodejs-app-${local.timestamp}"

source_ami_filter {
filters = {
name = "amzn2-ami-hvm-*-x86_64-gp2"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["amazon"]
}

instance_type = "t2.micro"
region = "us-east-1"
ssh_username = "ec2-user"
}

build {
sources = [
"source.amazon-ebs.nodejs"
]

provisioner "shell" {
script = "./setup-amzn2.sh"
}

provisioner "file" {
source = 
"/Users/admin/repos/exercises/packer/IaC/packer/NodeJS_On_EC2/node-hello"
destination = "/home/ec2-user/app"
}

provisioner "shell" {
script = "./setup-node-amzn2.sh"
}

post-processor "manifest" {
output = "manifest.json"
strip_path = true
}

}

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/eca276eb-8c09-420c-84b4-144047ff6074n%40googlegroups.com.

Reply via email to