How to fix error with xml2-config not found when i

2019-03-08 02:50发布

When I try to install php 5.3 stable from source on Ubuntu (downloading compressed installation file from http://www.php.net/downloads.php) and I run ./configure I get this error:

configure: error: xml2-config not found. Please check your libxml2 installation.

3条回答
兄弟一词,经得起流年.
2楼-- · 2019-03-08 03:10

All you need to do instal install package libxml2-dev for example:

sudo apt-get install libxml2-dev

On CentOS/RHEL:

sudo yum install libxml2-devel
查看更多
Fickle 薄情
3楼-- · 2019-03-08 03:12

I had the same issue when I used a DockerFile. My Docker is based on the php:5.5-apache image.

I got that error when executing the command "RUN docker-php-ext-install soap"

I have solved it by adding the following command to my DockerFile

"RUN apt-get update && apt-get install -y libxml2-dev"

查看更多
倾城 Initia
4楼-- · 2019-03-08 03:22

For the latest versions it is needed to install libxml++2.6-dev like that:

apt-get install libxml++2.6-dev
查看更多
登录 后发表回答