Skip to content

docker-php-ext-install DOM failed #20022

Closed

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

Activity

  1. changed the title [-]DOM ext[/-] [+]docker-php-ext-install DOM failed[/+] on Oct 1, 2025
  2. self-assigned this
    on Oct 1, 2025
  3. added a commit that references this issue on Oct 1, 2025
    4fe0402
  4. added 2 commits that reference this issue on Oct 1, 2025
    b1d487a
    52e1c9f
  5. added a commit that references this issue on Oct 1, 2025
    3ac2788
  6. ko4an4ik commented on Oct 19, 2025

    @ko4an4ik

    Still reproduces for bookworm debian

    FROM php:8.4-fpm-bookworm
    
    RUN apt-get update \
        && apt-get upgrade -y \
        && apt-get install -y libxml2-dev
    
    RUN docker-php-ext-install dom
    
    35.51 /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
    35.51    16 | #include "ext/dom/lexbor/lexbor/selectors-adapted/selectors.h"
    35.51       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    35.51 compilation terminated.
    35.51 make: *** [Makefile:817: lexbor/lexbor/selectors-adapted/selectors.lo] Error 1
    
    
  7. ndossche commented on Oct 19, 2025

    @ndossche
    Member

    @ko4an4ik That's because php:8.4-fpm-bookworm is outdated and shipping PHP 8.4.13 instead of PHP 8.4.14.
    Note that we don't maintain the "official" Docker images, that's from Docker itself. (i.e. they're actually not "official" but whatever)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions