If you are attempting to install Oracle Database, or another software package that uses a similar installation structure, and encounter the error unzip: cannot find any matches for wildcard specification stage/Components/oracle.swd.jre/... , it means the unzip command failed to locate necessary JAR files within the staging area of the installation package.
The installer crashes with "JRE missing in scratch path". 1.2.2 Top Solutions to Fix the Error 1. Re-extract the Installation File
…means: "You asked me to extract files matching the pattern stage components (but components might be a separate argument or part of a wildcard), and I couldn't find any entry inside the ZIP file that fits that pattern." If you are attempting to install Oracle Database,
If your path contains environment variables that need to be evaluated by the shell, use double quotes ( " ) instead. unzip archive.zip "stage components/*" Use code with caution. Solution 3: Use the Backslash Escape Character
Double quotes also prevent regular wildcard expansion, though they still allow variable expansion (like $VAR ). This is highly effective for basic wildcard matching. unzip "stage*.zip" Use code with caution. unzip archive.zip "components/*" Use code with caution. 3. Escape the Wildcard with a Backslash Solution 3: Use the Backslash Escape Character Double
It passes the literal string to unzip , which then fails because it looks for a literal file named with asterisks.
where my.zip contains no stage or components at the root. unzip tries matching the first pattern stage , fails, prints: If you are attempting to install Oracle Database,
If you want to extract multiple specific paths, list them clearly as separate arguments: unzip archive.zip "stage/*" "components/*" Use code with caution. Prevention in CI/CD (GitHub Actions & GitLab CI)
In some CI/CD runners or macOS environments running Zsh, the shell is strictly configured to throw an error if a wildcard fails to match local files.
mkdir temp_dir unzip archive.zip -d temp_dir # Then find and move the files find temp_dir -name "*stage components*" -exec mv {} . \; Use code with caution. Summary Checklist unzip -l archive.zip Quote Pattern unzip archive.zip '*pattern*' Check Case Match the exact case seen in -l output Specify Path unzip archive.zip "dir/file.txt" Conclusion