今天在编译安装php的时候出现libxml2 configure: error: xml2-config not found. Please check your libxml2 installation.错误

意思是缺少libxml2这个包的意思(安装环境是在centos6.6)

于是通过yum  install  libxml2 安装后 ./configure  --prefix=/usr/local/php(./configure  --prefix=dir目的在于指定软件安装的路径)还是提示该问题,但是我已经装了libxml2这个包,还提示找不到。原因在于./configure 配置安装php的时候,我们并没有指定依赖包的路劲。

而通过yum的方式安装软件包,会把软件包的文件复制到不同的目录下,这样也不好指定

于是可以通过编译安装libxml2 软件包的方式来进行。

1.首先下载一个libxml2-2.7.2.tar.gz软件包

2.解压进入该目录

./configure  --prefix=/usr/local/libxml2     //将libxml2软件包指定安装到/usr/local/libxml2 目录
make
make install 

3. 进入php的解压路劲,查看如何指定该软件包

[root@localhost php-5.6.4]# ./configure --help | grep libxml2
  --with-libxml-dir=DIR   LIBXML: libxml2 install prefix
  --with-libxml-dir=DIR   DOM: libxml2 install prefix
  --with-libxml-dir=DIR   SimpleXML: libxml2 install prefix
  --with-libxml-dir=DIR   SOAP: libxml2 install prefix
  --with-libxml-dir=DIR   WDDX: libxml2 install prefix
  --with-libxml-dir=DIR   XML: libxml2 install prefix
  --with-libxml-dir=DIR   XMLReader: libxml2 install prefix
  --with-libxml-dir=DIR   XMLRPC-EPI: libxml2 install prefix
  --with-libxml-dir=DIR   XMLWriter: libxml2 install prefix

通过以上的信息,我们知道libxml2的路径的指定方式

./configure --prefix=/usr/local/php  --with-libxml-dir=/usr/local/libxml2

到此问题解决,php安装成功

./configure --with-package=dir指定依赖的软件包相关推荐

  1. 为什么Spring Boot项目引入依赖的时候可以不指定依赖的版本号

    不知道大家在Spring Boot 项目中引入依赖的时候有没有注意到一个问题:引入的依赖不指定版本号,比如下面这样,但是也可以下载到对应的jar 包. <!-- 添加对JDBC 的支持 --&g ...

  2. Qt Creator指定依赖项

    Qt Creator指定依赖项 指定依赖项 指定依赖项 如果在一个会话中加载了多个项目,则可以定义它们的构建顺序.例如,如果项目A依赖于项目B,则必须首先构建项目B. 注意:构建顺序存储为会话的属性, ...

  3. configure: error: Package requirements (oniguruma) were not met

    configure: error: Package requirements (oniguruma) were not met 在Centos8环境中配置PHP出现如上报错: 原因是没有安装配置oni ...

  4. configure: error: Package requirements (sqlite3 」 3.7.4) were not met:

    configure: error: Package requirements (sqlite3 > 3.7.4) were not met: 原因: 在Centos8环境中配置php-7.4.1 ...

  5. configure: error: Package requirements (oniguruma) were not met: No package ‘oniguruma‘ found

    CentOS安装php7.4.* 提示 configure: error: Package requirements (oniguruma) were not met: No package 'oni ...

  6. configure: error: Package requirements (libwebp) were not met:

    configure: error: Package requirements (libwebp) were not met: 解决方法: yum install libwebp-devel

  7. 【Android Gradle 插件】Android 依赖管理 ⑥ ( 依赖冲突处理 | transitive 依赖传递设置 | exclude 依赖排除设置 | force 强制指定依赖库 )

    文章目录 一.查询 Android 依赖库的配置 二.通过 ModuleDependency#transitive 依赖传递设置 三.通过 ModuleDependency#exclude 设置排除子 ...

  8. java rpm卸载_怎样使用rpm命令一次性删除依赖的软件包

    怎样使用rpm命令一次性删除依赖的软件包 搜索了一下网络,发现解法大体有两种: 第一种方法:不管依赖包 相互依赖的软件包,使用rpm的--nodeps参数就搞定了. rpm --nodeps -e g ...

  9. 因无法自动找到所依赖的软件包或修复存在冲突的软件包,所要求的更改无法完成

    问题描述:iPod touch6 ,10.0.2的系统,使用 yalu102 越狱后,cydia 里无法安装其他插件:报错: 因无法自动找到所依赖的软件包或修复存在冲突的软件包,所要求的更改无法完成. ...

最新文章

  1. iOS 10 个实用小技巧(总有你不知道的和你会用到的)
  2. SharePoint 2010自定义母版页小技巧——JavaScript和CSS引用
  3. python函数的作用是_Python函数一
  4. jdbc动态查询语句_Java修行第037天--JDBC技术
  5. Java的知识点32——Mysql的简单使用
  6. python getattr函数_[转]Python中的getattr()函数详解
  7. 【解决】Error:java: javacTask: source release 8 requires target release 1.8
  8. django 中间件的使用
  9. USACO Training Section 5.1 Fencing the Cows 圈奶牛(凸包)
  10. 核酸结果统计难?130行代码实现基于ocr的核酸截图识别存储Excel(复现代码核查核酸报告)
  11. php width,PHP imagefontwidth()用法及代码示例
  12. 关于配置环境变量相关解答
  13. shell基础07 函数
  14. “稿费+股权”能打造亿万富翁作家?
  15. android sdk 文档导读之前传:初涉
  16. Java版本微信授权登录(升级版)
  17. Alexa, Stop Spying on Me!“: Speech Privacy Protection Against Voice Assistants
  18. 2021-02-10
  19. neo4j - 查询效率的几种优化思路
  20. c++windows+yolov5-6.2+openvino模型部署超详细

热门文章

  1. 高等数学:第三章 微分中值定理与导数的应用(3)曲线的凹凸 拐点 曲率
  2. Python计算机视觉:第十章 OpenCV
  3. 从CVPR 2013看计算机视觉的研究领域和趋势 [CVPR 2013] Three Trending Computer Vision Research Areas
  4. 开源图像检索工具:CaliphEmir使用方法
  5. Matlab之switch-case语句
  6. 锐捷云课堂助力海南农垦中学 根治计算机教室“老病根”
  7. Svg 嵌入可编辑的div
  8. 掉网问题的log分析
  9. 将自己的APK变成系统的APK
  10. 图形脚本语言sikuli