报错

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音视频开发3-vlc录像存储

    一.前言 录像功能是视频监控系统的常用功能,就是将打开的视频流或者视频文件重新保存成MP4文件,当然也可以保存成其他格式,一般默认用MP4比较好,比较标准一些,MP4格式的兼容性最好,基本上没有说那台 ...

  2. 报错test_features2d.cpp:51:10: fatal error: features2d/test/test_detectors_regression.impl.hpp: 没有那个文件

    问题描述: ubuntu18.04安装opencv4.5.1+contrib 报错test_features2d.cpp:51:10: fatal error: features2d/test/tes ...

  3. OpenMMLab AI实战营 第四课笔记

    OpenMMLab AI实战营 第四课笔记 目录 OpenMMLab AI实战营 第四课笔记 目标检测与MMDetection 1.什么是目标检测 1.1 目标检测的应用 1.1.1 目标检测 in ...

  4. Solution -「AGC 031E」Snuke the Phantom Thief

    \(\mathscr{Description}\)   Link.   在一个网格图内有 \(n\) 个格子有正价值,给出四种限制:横 / 纵坐标不大于 / 不小于 \(a\) 的格子不能选超过 \( ...

  5. Pod的优雅上下线

    Pod的优雅上下线依赖k8s的监控检查机制,以及 Pod lifecycle Hooks,通过这些kubernetes的机制,配合服务发现的流量管理机制,实现业务的优雅上下线. 基础概念 Pod 健康 ...

  6. 利用Linq Skip() Take()分页

    private void TestPostData() { string all = ""; List<int> listTimeCard = new List< ...

  7. RESTful 架构详解-copy

    1. 什么是REST REST全称是Representational State Transfer,中文意思是表述(编者注:通常译为表征)性状态转移. 它首次出现在2000年Roy Fielding的 ...

  8. 3 x 2 + 1 !安 全 能 力 权 威 认 可 !

    近日,由XOps大会组委会主办的"2024第三届XOps产业创新发展论坛"在北京召开.大会主论坛公布了2024上半年XOps最新评估结果,天翼云顺利通过ITU DevOps国际标准 ...

  9. Q:查看锁表进程,及杀死所有锁表进程sql

     查看锁表进程 SELECT DISTINCT decode(s.inst_id, 1, 'DB1', 2, 'DB2') 数据库服务器, decode(s.BLOCKING_SESSION, '', ...

  10. 拒绝繁忙!免费使用 deepseek-r1:671B 参数满血模型

    相信大家都已经有体验过deepseek-r1的强大推理能力,由于其网页版本免费使用的原因,用户量激增.同时据传还遭受了大量的网络攻击,这使得过程不是很流程,经常收到类似下图的问题: 同时,API服务也 ...