Skip to content

docker-php-ext-install DOM failed #20022

@wundii

Description

@wundii

Description

The following code:

FROM php:8.4-fpm

RUN apt-get update \
    && apt-get upgrade -y \
    && apt-get install -y libxml2-dev

RUN docker-php-ext-install dom

Resulted in this output:

41.86 /usr/src/php/ext/dom/lexbor/lexbor/selectors-adapted/selectors.c:16:10: fatal error: ext/dom/lexbor/lexbor/selectors-adapted/selectors.h: No such file or directory
41.86    16 | #include "ext/dom/lexbor/lexbor/selectors-adapted/selectors.h"
41.86       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41.86 compilation terminated.
41.87 make: *** [Makefile:817: lexbor/lexbor/selectors-adapted/selectors.lo] Error 1

It works perfectly with the current PHP versions 8.2.29 and 8.3.26.

PHP Version

PHP 8.4.13 (fpm-fcgi) (built: Sep 29 2025 23:51:38) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.4.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.13, Copyright (c), by Zend Technolog

Operating System

Ubuntu 24.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions