在 Windows WSL 2.0 上的 Arch Linux 中从 ASDF 安装(编译)PHP 7.2.34 时出现问题

发布于 2025-01-09 08:38:00 字数 2895 浏览 1 评论 0原文

我正在尝试在 Windows WSL 2.0 上的 Arch Linux 中配置开发环境。

我在本指南视频 (pt-br) 中遵循 Akita On Rails 的 Arch 配置: O Melhor 设置开发 com Arch e WSL2(Arch 和 WSL2 的最佳开发设置)

到目前为止,一切顺利。我去了官方github ASDF(asdf-vm)插件(所有插件) PHP 页面 (asdf-php)并按照说明进行操作:

  ~ ················································································································ 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
❯

然后我尝试安装 PHP 7.2.34 并获取 出现以下错误:

❯ 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
❯

完成后,ASDF PHP 列表显示:“未安装任何版本”,但我不知道需要配置什么才能使其工作。

我什至尝试更新插件:

  ~ ················································································································ 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
❯

但最终,我仍然遇到同样的问题:“未安装版本”。我不知道在哪里可以找到有关此问题的文档。

有什么想法吗?谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪是无色的血 2025-01-16 08:38:00

我有同样的问题。

它缺少库,以下命令解决了它。

yay -S libpng

I has the same problem.

It was missing library, the following command solved it.

yay -S libpng
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文