报错

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. Makefile文件中,两个$的变量变量$$Xxx 与一个$的变量 $Xxx的区别

    原文地址:Makefile文件中,两个$的变量变量$$Xxx 与一个$的变量 $Xxx的区别 Makefile 中的变量引用 在 Makefile 中,$ 符号用于变量替换,但它的使用方式有一些细微的 ...

  2. 详解AQS四:ReentrantLock条件队列原理

    ReentrantLock的条件队列是实现"等待通知"机制的关键,之前在<java线程间通信:等待通知机制>一文中讲过了使用ReentrantLock实现多生产者.多消 ...

  3. 在用Android StudioBuild项目时,提示:Could not resolve all files for configuration ':classpath'.Could not find com.android.tools.

    在用Android StudioBuild项目时,提示:Could not resolve all files for configuration ':classpath'.Could not fin ...

  4. Python 元类(Meta Class):解密 Python 面向对象编程的幕后推手

    在 Python 编程中,我们每天都在和类打交道,但是你是否也和我一样想过:类本身是什么?是谁创建了类?元类(Meta Class)就是用来创建类的"类".今天让我们一起深入理解这 ...

  5. .NET8.0多线程编码结合异步编码示例

    1.创建一个.NET8.0控制台项目来演示多线程的应用 2.快速创建一个线程 3.多次运行程序,可以得到输出结果 这就是多线程的特点 - 当多个线程并行执行时,它们的具体执行顺序是不确定的,除非我们使 ...

  6. HTTP方法-GET对比POST

    什么是 HTTP ? 超文本传输协议(HTTP)的设计目的是保证客户端与服务器之间的通信. HTTP 的工作方式是客户端与服务器之间的请求-应答协议. web 浏览器可能是客户端,而计算机上的网络应用 ...

  7. biancheng-Hibernate框架

    目录http://c.biancheng.net/hibernate/ 1ORM是什么2Hibernate是什么3Hibernate项目创建流程4Hibernate增删改查操作5Hibernate工作 ...

  8. w3cschool-spring详解

    参考地址 https://www.w3cschool.cn/wkspring/dcu91icn.html Spring 体系结构 2021-11-03 18:18 更新 体系结构 Spring 有可能 ...

  9. 解决webstorm无法识别@等,无法ctrl跳转问题,vue项目配置

    1.1. 配置webpack.config.js文件 /*为了webstorm识别vite中设置的别名*/ 'use strict' const path = require('path') modu ...

  10. 使用 SOUI 开发高 DPI 桌面应用程序[转载]

    原文:使用 SOUI 开发高 DPI 桌面应用程序_吹泡泡的小猫的博客-CSDN博客 补充说明:soui3以后版本对dpi的支持更完善了,用起来也更简单了. 1 应用程序感知 DPI 变化 在 Win ...