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

Source: Internet
Author: User

Linux configure: error: xml2-config not found. Please check your libxml2 installation, xml2-configlibxml2
Problem:

When downloading and installing the source code package

Problem package link:

Php5.3.22 source code package

Problem description:

Linux installation files are divided into: source code package (tar.gz.pdf and non-source code package (rpm,deb,tar.gz of non-source code). to install the source code package, enter the decompressed directory. The extracted directory is/home/ccc/Downloads/php5.3.22.

1. Run the cd command to go to php5.3.22 and check the folder content. Most of the files will be installed with the README file. The detailed steps for installing the software will be shown in the README file. Many new users like me will make the same mistake: Execute the configure command without entering the directory/home/ccc/Downloads/php5.3.22 of the extracted files, this will cause an inexplicable installation error. We recommend that you enter.

2. Set the installation directory sudo./configure -- prefix = your installation path

(1) The rpm or deb package installation directory has a default value when the software is developed, so no change is required.


(2) set the source code package to/usr/local/(generally)

Execute Command

The MakeFile is automatically generated in the decompressed directory.

(3). MakeThe duration of this process depends on the installation package.

(4). If the make command does not produce an errorMake installComplete the installation. Once the make command has an error, you can use make clean to clear all the files generated by the make command. Before executing make install, all the operations are not written to the installation directory you actually defined, that is, the/usr/local/php5.3.22 /.


Problem:

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

Solution:

RunSudo apt-get install libxml2

Run the command again if the message is successful or already exists.

If the configure: error: xml2-config not found. Please check your libxml2 installation error also appears, the libxml2-dev may be missing.

RunSudo apt-get install libxml2-dev.

You can install php5.3.22successfully.

The above problem is just an example. You only need to solve it in a similar way.

 

Question added:

Although each software has a non-source package and a source package, which one should we install?

It depends on what you want to do. If you are a server with high performance requirements, the source code package is recommended.

If you are using a pc, we recommend that you use a non-source package.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.