phpwindows-subsystem-for-linuxarchasdf

Problem to install (compile) PHP 7.2.34 from ASDF in Arch Linux on Windows WSL 2.0


I´m trying to configure a develop environment in Arch Linux on Windows WSL 2.0.

The Arch configuration I followed from Akita On Rails in this guide-tutorial (pt-br) video: O Melhor Setup Dev com Arch e WSL2 (The best dev setup with Arch and WSL2)

So far, so good. I went to official github ASDF (asdf-vm) plugin (all plugins) PHP page (asdf-php) and followed the instructions:

  ~ ················································································································ at  11:37:47
❯ asdf plugin-add php https://github.com/asdf-community/asdf-php.git
  ~ ····································································································· took  17s at  11:38:28
php
  No versions installed
  ~ ················································································································ at  11:38:37
❯

Then I try to install PHP 7.2.34 and get the following error:

❯ asdf install php 7.2.34
Determining configuration options...
/home/rod/.asdf/plugins/php/bin/install: line 323: locate: command not found
/home/rod/.asdf/plugins/php/bin/install: line 324: locate: command not found
Downloading source code...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   133  100   133    0     0      8      0  0:00:16  0:00:16 --:--:--    34
100 16.9M    0 16.9M    0     0   496k      0 --:--:--  0:00:35 --:--:-- 3791k
Extracting source code...
Running buildconfig...
Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.71 (ok)
rebuilding aclocal.m4
rebuilding configure
...
If configure fails try --with-webp-dir=<DIR>
If configure fails try --with-jpeg-dir=<DIR>
configure: error: png.h not found.
  ~ ··································································································· took  1m 9s at  11:46:33
❯ asdf list php
  No versions installed
  ~ ················································································································ at  11:48:23
❯

When finished the ASDF PHP list shows: "No versions installed", but I´m not know what I need to configure to make this work.

I even tryied to update the plugin:

  ~ ················································································································ at  11:52:30
❯ asdf plugin update php
Updating php to master
Already on 'master'
Your branch is up to date with 'origin/master'.
  ~ ····································································································· took  17s at  11:52:59
❯

But in the end, I still get the same issue: "No versions installed". I don't know where I can find a documentation about this issue.

Any ideas? Thank you


Solution

  • I has the same problem.

    It was missing library, the following command solved it.

    yay -S libpng