报错

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

Can't find PHP headers in /usr/include/php The php-devel package is required for use of this command.的更多相关文章

  1. Can't find PHP headers in /usr/include/php

    解决办法: yum install php-devel

  2. /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’

    /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’/usr/include/linux/types.h:13: erro ...

  3. 解决Cannot find MySQL header files under /usr/include/mysql的错误

    按照下面的步骤能成功,亲测.转帖,做笔记 编译php-5.5-6的mysql支持,出现Cannot find MySQL header files under /usr/include/mysql. ...

  4. 编译安装php Cannot find MySQL header files under /usr/include/mysql.

    编译php-5.5-6的mysql支持,出现Cannot find MySQL header files under /usr/include/mysql. Note that the MySQL c ...

  5. error: /usr/include/objc/objc-class.h: No such file or directory

    When i use the example of ShareKit package,i have come across this error:"error: /usr/include/o ...

  6. error: /usr/include/stdio.h: Permission denied 的一种情况分析

    error: /usr/include/stdio.h: Permission denied 的一种情况分析 代码: #include <stdio.h> int main(){ prin ...

  7. Mac下一个/usr/include失踪

    Mac升级到Yosemite后,突然发现vim的YouCompleteMe代码提示所以空头支票成员,排查了一下,原本/usr/include目录中缺少.所有的C/C++头文件不见了. .. 第一次发现 ...

  8. ubuntu没有/usr/include/sys目录

    实际上不是没有sys目录,只是系统给换路径了 32位系统:/usr/incude/i386-linux-gnu/sys 64位系统:/usr/include/x86_64-linux-gnu/sys/ ...

  9. [C++]Linux之头文件sys/types.h[/usr/include/sys]

    1.查找<sys/types.h>文件 一般地,Linux的C头文件<sys/types.h>路径在如题的途径:/usr/include/sys下,然而博主[Linux For ...

  10. usr/include/c++/6.4.1/bits/stl_relops.:67: Parse error at "std"

    问题描述: 1.编译某qt工程的32位架构二进制包时,出现了上面错误,具体错误信息如下 qmake-qt5 -o ProductLicense/Makefile ProductLicense/Prod ...

随机推荐

  1. 解决File "<input>", line 1 pip install XXXX ^ SyntaxError: invalid syntax

    首先退出python exit() 打开cmd里直接输入(不要进python) pip install XXX

  2. Qt/C++编写视频监控系统80-远程回放视频流

    一.前言 远程回放NVR或者服务器上的视频文件,一般有三种方式,第一种是调用厂家的SDK,这个功能最全,但是缺点明显就是每个厂家的设备都有自己的SDK,只兼容自家的设备,如果你的软件需要接入多个厂家的 ...

  3. Qt编写地图综合应用27-点聚合

    一.前言 在地图上查询结果通常以标记点的形式展现,但是如果标记点较多,不仅会大大增加客户端的渲染时间,让客户端变得很卡,而且会让人产生密集恐惧症.为了解决这一问题,我们需要一种手段能在用户有限的可视区 ...

  4. AOP拦截日志

    首先对于AOP切面编程,我也是刚学习,了解不深,这边先引用老张的博客,方便大家学习. 首先想一想,如果有这么一个需求,要记录整个项目的接口和调用情况,当然如果只是控制器的话,还是挺简单的,直接用一个过 ...

  5. 得物自研客服IM中收发聊天消息背后的技术逻辑和思考实现

    本文由得物技术WWQ分享,原题"客服发送一条消息背后的技术和思",本文有修订和改动. 1.引言 在企业IM客服场景中,客服发送一条消息的背后,需要考虑网络通信.前端展示.后端存储以 ...

  6. runoob-设计模式

    https://www.runoob.com/design-pattern/design-pattern-tutorial.html 设计模式(Design pattern)代表了最佳的实践,通常被有 ...

  7. leetcode-Linux 简介

    https://leetcode-cn.com/leetbook/read/awesome-linux-handbook/eg4ecm/ Linux 系统是一种金字塔模型的系统,如下所示 应用程序发起 ...

  8. 如何分析jmeter性能测试数据

    1.jmeter插件 https://blog.csdn.net/weixin_39430584/article/details/80947093 http://www.doc88.com/p-214 ...

  9. uniapp去修改vuex中state中的值

    修改state中的值 修改state中的值,方法 (1) 在mutations中写修改state的api. (2)写好之后,直接store.commit("changeValue" ...

  10. 如何在WPS和Word/Excel中直接使用DeepSeek功能

    以下是将DeepSeek功能集成到WPS中的详细步骤,无需本地部署模型,直接通过官网连接使用:1. 下载并安装OfficeAI插件 (1)访问OfficeAI插件下载地址:https://www.of ...