curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add –
 
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
 
sudo apt update && sudo apt install packer 
Reading package lists... Done
section in apt-key(8) for details.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  packer
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
Need to get 15.4 MB of archives.
After this operation, 49.7 MB of additional disk space will be used.
Get:1 https://apt.releases.hashicorp.com jammy/main amd64 packer amd64 1.11.2-1 [15.4 MB]
Fetched 15.4 MB in 1s (20.4 MB/s)
Selecting previously unselected package packer.
(Reading database ... 98086 files and directories currently installed.)
Preparing to unpack .../packer_1.11.2-1_amd64.deb ...
Unpacking packer (1.11.2-1) ...
Setting up packer (1.11.2-1) ...
