Skip to content

Documentation: Required system dependencies for building PHP #202

Description

@limaon

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

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

Ubuntu/Debian

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

Fedora

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 <version>.

Environment

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions