asdf-community / asdf-community/asdf-php

Documentation: Required system dependencies for building PHP

Open
#202 1 comment 2 reactions 1 assignee Claimed by @Rusydy View on GitHub
Dominant language
Shell
Stars
256
Forks
117
PR merge metrics
No merged PRs in 30d

Description

The current documentation lacks a comprehensive list of system dependencies required to build PHP from source. Users encounter multiple configure errors during installation, requiring them to install dependencies one by one.

### Required Dependencies

Below are the required system packages to successfully build PHP with asdf-php:

#### Arch Linux

```bash
sudo pacman -S autoconf bison re2c libxml2 sqlite oniguruma gd postgresql-libs libzip
```

#### Ubuntu/Debian

```bash
sudo apt install autoconf bison re2c libxml2-dev libsqlite3-dev libonig-dev libcurl4-openssl-dev pkg-config libgd-dev libpq-dev libzip-dev
```

#### Fedora

```bash
sudo dnf install autoconf bison re2c libxml2-devel sqlite-devel oniguruma-devel libcurl-devel gd-devel libpq-devel libzip-devel
```

### Common Errors Without Dependencies

| Missing Package | Error Message |
| --------------------------- | ------------------------------------------------------------------------ |
| `re2c` | `configure: error: re2c 1.0.3 or newer is required to generate PHP lexers` |
| `gd` / `libgd-dev` | `Package 'gdlib' not found` |
| `postgresql-libs` / `libpq-dev` | `Cannot find libpq-fe.h or pq library (libpq)` |
| `libzip` / `libzip-dev` | `Package 'libzip' not found` |

### Suggestion

Add a "Prerequisites" or "System Dependencies" section to the README with the commands above, so users can install all dependencies before running `asdf install php `.

### Environment

- OS: Linux (Arch/Ubuntu/Debian/Fedora)
- asdf version: latest
- PHP version attempted: 8.5.2

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.