rapid7 / metasploitable3

Metasploitable3 is a VM that is built from the ground up with a large amount of security vulnerabilities.
Other
4.74k stars 1.14k forks source link

"./build.sh: line 36: 1.6.0: command not found" when running build.sh #621

Open ANeilan opened 5 months ago

ANeilan commented 5 months ago

Issue Description

Please check the General Issues section in the wiki before you submit the issue. If you didn't find your issue mentioned, please give a thorough description of the issue you're seeing. Also, please be sure to include any troubleshooting steps that you've already attempted.

When running the build.sh script, the line in the title is printed twice and then the script errors out, despite having the requisite versions of packer and vagrant. note: it seems that fedora has removed the /sbin/packer binary that used to be a problem, renaming it to cracklib-packer.

Host System

Command Output

Compatible version of VirtualBox found.
Virtualbox images will be built.
./build.sh: line 36: 1.6.0: command not found
./build.sh: line 36: 1.6.0: command not found
Compatible version of packer was not found. Please install from here: https://www.packer.io/downloads.html
incyi commented 2 months ago

Same issue here:

┌──(inanc㉿linux)-[~/metasploitable3] └─$ TMPDIR=/mnt/extern/tmp ./build.sh ubuntu1404 building ubuntu 1404 Compatible version of VirtualBox found. Virtualbox images will be built. ./build.sh: line 36: 1.6.0: command not found ./build.sh: line 36: 1.6.0: command not found Compatible version of packer was not found. Please install from here: https://www.packer.io/downloads.html

inanc@linux

OS: Kali GNU/Linux Rolling x86_64 Host: HP EliteDesk 800 G1 USDT Kernel: 6.8.11-amd64 Uptime: 1 hour, 28 mins Packages: 3073 (dpkg) Shell: zsh 5.9 Resolution: 1920x1080 CPU: Intel i5-4570S (4) @ 3.600GHz GPU: Intel HD Graphics Memory: 772MiB / 15890MiB

incyi commented 2 months ago

Solved by install packer v1.9.5. https://releases.hashicorp.com/packer/1.9.5/

ivanseminara commented 1 week ago

Same problem on Ubuntu 24.04. packer -v outputs "Packer v1.11.2" which shifts the arguments forward (eg. $1: Packer, $2: v1.11.2, $3: 1.6.0) then the scripts expects the 3rd argument to be true/false and blows up.

I've temporarily solved by cutting everything before the version numbers (-dv -f2). Clunky but works.