报错

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. Qt开源作品30-农历控件

    一.前言 农历控件在国产linux中必备的控件之一,毕竟要适应国人的习惯,你看win10系统的日历,现在点开来直接就有农历在上面,非常方便人性化,所以在很多用Qt做的项目中,也有农历控件的应用场景,而 ...

  2. Qt编写安防视频监控系统28-摄像机点位

    一.前言 摄像机点位的功能主要是在图片地图和在线离线地图上设置对应摄像机的位置,然后双击可以实时预览对应摄像机的视频,在图片地图上拖动摄像机图标到对应位置,系统会自动保存位置信息,在网页地图上的摄像机 ...

  3. 融云技术分享:全面揭秘亿级IM消息的可靠投递机制

    本文由融云技术团队原创分享,原题"IM 消息同步机制全面解析",为使文章更好理解,对内容进行了重新归纳和细节修订. 1.内容概述 即时通讯(IM)系统最基础.最重要的是消息的及时性 ...

  4. elasticsearch数据导出和导入

    数据导入和导出依赖于命令 elasticdump 数据导出 #!/bin/bash ES=http://ip:port ED=数据保存位置 datename=$(date +%Y-%m-%d) #da ...

  5. 老生常谈——分布式限流:部分Sentinal源码解读

    基础知识 HTTP CODE = 429 "请求过多" A. 限流的类型 服务端 客户端 限流的标的 IP 用户 ... 基本要求 准确限制过量的请求. 低延时.限流器不能拖慢HT ...

  6. 如何发现漏洞之我的多功能武器BurpSuite与全能插件

    知识点 1.插件类-武装BurpSuite-漏洞检测&分析辅助 2.插件类-武装谷歌浏览器-信息收集&情报辅助 一.演示案例-插件类-武装BurpSuite-漏洞检测&分析辅助 ...

  7. 一个奇葩的SQL题,够强大。

    困惑描述: 现有一张图片表,表里一个sort字段,这个字段是不重复的.不连续的数字.大致结构如下 create table Imgs( `id` bigint(20) NOT NULL AUTO_IN ...

  8. 原生js元素拖动效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. linux:rpm

    rpm 对软件包进行管理:查询.卸载.安装 查询 rpm -qa | grep 关键字   :查询指定的包 卸载 rpm -e  关键字  :卸载指定的包 若存在依赖关系: rpm -e  关键字  ...

  10. Algernon pg walkthrough Window

    第一次打window 从简单的开始打起吧 nmap └─# nmap -p- -A 192.168.150.65 Starting Nmap 7.94SVN ( https://nmap.org ) ...