Skip to content

Instantly share code, notes, and snippets.

@marteinn
Created May 28, 2021 07:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marteinn/132900b415f0ad348c507ad327be3d3d to your computer and use it in GitHub Desktop.
Save marteinn/132900b415f0ad348c507ad327be3d3d to your computer and use it in GitHub Desktop.
Solution for Unrecognized archive format in asdf

Are you getting the error "Unrecognized archive format" while trying to install php on asdf?

asdf install php 7.4                                                                                                                      develop ⬆ ✖ ✱ ◼
Determining configuration options...
Downloading source code...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   120  100   120    0     0    272      0 --:--:-- --:--:-- --:--:--   272
100    14  100    14    0     0     18      0 --:--:-- --:--:-- --:--:--    18
Extracting source code...
tar: Error opening archive: Unrecognized archive format

It's because asdf can't find the proper php version, include the minor version as well, like this:

asdf install php 7.4.18                                                                                                                  ✘ 1 develop ⬆ ✖ ✱ ◼
Determining configuration options...
Downloading source code...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   123  100   123    0     0    422      0 --:--:-- --:--:-- --:--:--   421
100 13.9M    0 13.9M    0     0  4769k      0 --:--:--  0:00:02 --:--:-- 6495k
Extracting source code...
Running buildconfig...
buildconf: Checking installation
buildconf: autoconf version 2.71 (ok)
buildconf: Forcing buildconf. The configure files will be regenerated.
buildconf: Cleaning cache and configure files
buildconf: Rebuilding configure
...

Done!

@dbenfouzari
Copy link

Oh thank you man, was struggling on this !

@mvcds
Copy link

mvcds commented Mar 6, 2024

🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment