rick645 Posted Thursday at 10:17 AM Share Posted Thursday at 10:17 AM (edited) + /usr/bin/docker run --rm php:8.2 \ php -r "echo XMLDiff\File::merge();" Fatal error: Uncaught Error: Class "XMLDiff\File" not found in Command line code:1 mmmhhh... Perhaps the appropriate extension must be installed (it should be php8.2-xml). So let's do this + cat Dockerfile FROM php:8.2 RUN apt-get update \ && apt-get -y install php8.2-xml \ && docker-php-ext-install php8.2-xml \ && docker-php-ext-enable php8.2-xml + /usr/bin/docker build -t test . [+] Building 7.4s (5/5) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 196B 0.0s => [internal] load metadata for docker.io/library/php:8.2 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => CACHED [1/2] FROM docker.io/library/php:8.2 0.0s => ERROR [2/2] RUN apt-get update && apt-get -y install php8.2-xml && docker-php-ext-install php8.2-xml 7.3s ------ > [2/2] RUN apt-get update && apt-get -y install php8.2-xml && docker-php-ext-install php8.2-xml && docker-php-ext-enable php8.2-xml: 0.342 Get:1 http://deb.debian.org/debianbookworm InRelease [151 kB] 0.469 Get:2 http://deb.debian.org/debianbookworm-updates InRelease [55.4 kB] 0.539 Get:3 http://deb.debian.org/debian-securitybookworm-security InRelease [48.0 kB] 0.597 Get:4 http://deb.debian.org/debianbookworm/main amd64 Packages [8792 kB] 4.851 Get:5 http://deb.debian.org/debianbookworm-updates/main amd64 Packages [13.5 kB] 4.861 Get:6 http://deb.debian.org/debian-securitybookworm-security/main amd64 Packages [241 kB] 5.883 Fetched 9301 kB in 6s (1653 kB/s) 5.883 Reading package lists... 6.445 Reading package lists... 7.019 Building dependency tree... 7.167 Reading state information... 7.175 Package php8.2-xml is not available, but is referred to by another package. 7.175 This may mean that the package is missing, has been obsoleted, or 7.175 is only available from another source 7.175 7.179 E: Package 'php8.2-xml' has no installation candidate ------ Dockerfile:3 -------------------- 2 | 3 | >>> RUN apt-get update \ 4 | >>> && apt-get -y install php8.2-xml \ 5 | >>> && docker-php-ext-install php8.2-xml \ 6 | >>> && docker-php-ext-enable php8.2-xml 7 | -------------------- ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get -y install php8.2-xml && docker-php-ext-install php8.2-xml && docker-php-ext-enable php8.2-xml" did not complete successfully: exit code: 100 Why? Obviously, consequently + /usr/bin/docker run test \ php -r "echo XMLDiff\File::merge();" Unable to find image 'test:latest' locally docker: Error response from daemon: pull access denied for test, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. So, how do you install the php8.2-xml extension? Edited Thursday at 10:23 AM by rick645 Quote Link to comment https://forums.phpfreaks.com/topic/326547-install-the-php82-xml-extension/ Share on other sites More sharing options...
Moorcam Posted Thursday at 12:18 PM Share Posted Thursday at 12:18 PM (edited) 2 hours ago, rick645 said: + /usr/bin/docker run --rm php:8.2 \ php -r "echo XMLDiff\File::merge();" Fatal error: Uncaught Error: Class "XMLDiff\File" not found in Command line code:1 mmmhhh... Perhaps the appropriate extension must be installed (it should be php8.2-xml). So let's do this + cat Dockerfile FROM php:8.2 RUN apt-get update \ && apt-get -y install php8.2-xml \ && docker-php-ext-install php8.2-xml \ && docker-php-ext-enable php8.2-xml + /usr/bin/docker build -t test . [+] Building 7.4s (5/5) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 196B 0.0s => [internal] load metadata for docker.io/library/php:8.2 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => CACHED [1/2] FROM docker.io/library/php:8.2 0.0s => ERROR [2/2] RUN apt-get update && apt-get -y install php8.2-xml && docker-php-ext-install php8.2-xml 7.3s ------ > [2/2] RUN apt-get update && apt-get -y install php8.2-xml && docker-php-ext-install php8.2-xml && docker-php-ext-enable php8.2-xml: 0.342 Get:1 http://deb.debian.org/debianbookworm InRelease [151 kB] 0.469 Get:2 http://deb.debian.org/debianbookworm-updates InRelease [55.4 kB] 0.539 Get:3 http://deb.debian.org/debian-securitybookworm-security InRelease [48.0 kB] 0.597 Get:4 http://deb.debian.org/debianbookworm/main amd64 Packages [8792 kB] 4.851 Get:5 http://deb.debian.org/debianbookworm-updates/main amd64 Packages [13.5 kB] 4.861 Get:6 http://deb.debian.org/debian-securitybookworm-security/main amd64 Packages [241 kB] 5.883 Fetched 9301 kB in 6s (1653 kB/s) 5.883 Reading package lists... 6.445 Reading package lists... 7.019 Building dependency tree... 7.167 Reading state information... 7.175 Package php8.2-xml is not available, but is referred to by another package. 7.175 This may mean that the package is missing, has been obsoleted, or 7.175 is only available from another source 7.175 7.179 E: Package 'php8.2-xml' has no installation candidate ------ Dockerfile:3 -------------------- 2 | 3 | >>> RUN apt-get update \ 4 | >>> && apt-get -y install php8.2-xml \ 5 | >>> && docker-php-ext-install php8.2-xml \ 6 | >>> && docker-php-ext-enable php8.2-xml 7 | -------------------- ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get -y install php8.2-xml && docker-php-ext-install php8.2-xml && docker-php-ext-enable php8.2-xml" did not complete successfully: exit code: 100 Why? Obviously, consequently + /usr/bin/docker run test \ php -r "echo XMLDiff\File::merge();" Unable to find image 'test:latest' locally docker: Error response from daemon: pull access denied for test, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. So, how do you install the php8.2-xml extension? I'm no expert but the error you are getting is indicating that you may need to login to Docker or the repo doesn't exist. Check the repo name and your access rights, I guess. Edited Thursday at 12:19 PM by Moorcam Quote Link to comment https://forums.phpfreaks.com/topic/326547-install-the-php82-xml-extension/#findComment-1648059 Share on other sites More sharing options...
gizmola Posted Thursday at 07:07 PM Share Posted Thursday at 07:07 PM Install via apt should take care of installation of the extension, so I don't think you need these: && docker-php-ext-install php8.2-xml \ && docker-php-ext-enable php8.2-xml Quote Link to comment https://forums.phpfreaks.com/topic/326547-install-the-php82-xml-extension/#findComment-1648076 Share on other sites More sharing options...
rick645 Posted 9 hours ago Author Share Posted 9 hours ago (edited) Quote I'm no expert but the error you are getting is indicating that you may need to login to Docker or the repo doesn't exist. $ docker login -u blabla... Password: WARNING! Your password will be stored unencrypted in /home/rino/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credential-stores Login Succeeded $ docker build . RUN apt-get update \ && apt-get -y install php-xml blabla... 7.782 E: Package 'php-xml' has no installation candidate Quote Check the repo name More precisely? Quote and your access rights, I guess. More precisely? Edited 9 hours ago by rick645 Quote Link to comment https://forums.phpfreaks.com/topic/326547-install-the-php82-xml-extension/#findComment-1648126 Share on other sites More sharing options...
rick645 Posted 9 hours ago Author Share Posted 9 hours ago 21 hours ago, gizmola said: Install via apt should take care of installation of the extension, so I don't think you need these: && docker-php-ext-install php8.2-xml \ && docker-php-ext-enable php8.2-xml Ok, but, details aside, do you have any solution? Quote Link to comment https://forums.phpfreaks.com/topic/326547-install-the-php82-xml-extension/#findComment-1648128 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.