zoukankan      html  css  js  c++  java
  • Can't find PHP headers in /usr/include/php The php-devel package is required for use of this command.

    报错

    phpize 编译扩展时,报错:Can't find PHP headers in /usr/include/php The php-devel package is required for use of this command.

    /usr/include/php 中找不到PHP头文件,使用此命令需要 php-devel 包。

    解决办法

    phpize 是用来扩展 php 扩展模块的,通过 phpize 可以建立 php 的外挂模块,phpize 是属于 php-devel 的内容,所以只要运行 yum install php-devel 就行了

    yum install php-devel
    

    接下来就会安装上 php-devel

    Installed:
      pcre-cpp-8.42-4.el8.x86_64                                 pcre-devel-8.42-4.el8.x86_64     
      pcre-utf16-8.42-4.el8.x86_64                               pcre-utf32-8.42-4.el8.x86_64     
      php-devel-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64     
    
    Complete!
    

    这时,如果使用 phpize 编译扩展出现 error:

    Error: php72w-common confiicts with php-common-xxx.xx
    You cold try using --skip-broken to work around the problem
    You cold try running:rpm -Va --nofiles --nodigest
    

    这说明仓库中默认的phpize与 PHP 版本不一致,我们可以看下 php-devel的版本,然后重新安装 phpize

    yum info php-devel
    Repository epel is listed more than once in the configuration
    Last metadata expiration check: 1:46:46 ago on Tue 02 Nov 2021 09:08:48 AM CST.
    Installed Packages
    Name         : php-devel
    Version      : 7.2.24
    Release      : 1.module_el8.2.0+313+b04d0a66
    Architecture : x86_64
    Size         : 5.3 M
    Source       : php-7.2.24-1.module_el8.2.0+313+b04d0a66.src.rpm
    Repository   : @System
    From repo    : AppStream
    Summary      : Files needed for building PHP extensions
    URL          : http://www.php.net/
    License      : PHP and Zend and BSD and MIT and ASL 1.0
    Description  : The php-devel package contains the files needed for building PHP
                 : extensions. If you need to compile your own PHP extensions, you will
                 : need to install this package.
    

    安装与当前版本一致的 php-devel就可以了,例如:

    yum install php72w-devel
    
  • 相关阅读:
    WannaMine4.0查杀方法
    kthrotlds(WatchDogs变种)查杀方法
    Powershell无文件挖矿查杀方法
    Myking&暗云III病毒查杀方法
    NAT ALG原理与应用
    Invoke-PSImage 使用简介
    Cobaltstrike 安装
    windows 创建、启动、删除、停止服务
    CobaltStrike 之 Attacks 菜单解析
    网络安全法(2016年11月7日发布 2017年6月1日起施行 主席令(第五十三号)公布)
  • 原文地址:https://www.cnblogs.com/niuben/p/15497867.html
Copyright © 2011-2022 走看看