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
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
Ubuntu/Debian
Fedora
Common Errors Without Dependencies
re2cconfigure: error: re2c 1.0.3 or newer is required to generate PHP lexersgd/libgd-devPackage 'gdlib' not foundpostgresql-libs/libpq-devCannot find libpq-fe.h or pq library (libpq)libzip/libzip-devPackage 'libzip' not foundSuggestion
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