简体   繁体   English

需要php-devel软件包,但已安装

[英]php-devel package required but is already installed

I am running PHP 7.2 and am trying to install oci8 我正在运行PHP 7.2,并尝试安装oci8

pecl install oci8 results in a download but it fails when running phpize with the following message: pecl install oci8导致下载,但运行phpize并显示以下消息时失败:

running: phpize
Can't find PHP headers in /opt/remi/php72/root/usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed

Howver, if I try to install php-devel I get a message that it is already installed: 但是,如果我尝试安装php-devel,则会收到一条消息,提示它已经安装:

Package php-devel-5.4.45-17.el7.remi.x86_64 already installed and latest version
Nothing to do

I have tried several options but cannot get phpize to work. 我尝试了几种方法,但无法使phpize正常工作。 Any help appreciated. 任何帮助表示赞赏。

Thanks 谢谢

UPDATE 更新

  • I did a fresh install of php 7.3 using remi. 我使用remi重新安装了php 7.3。 This installed the php.ini file into the /etc directory 这将php.ini文件安装到/ etc目录中
  • I installed php73-php-oci8 我安装了php73-php-oci8
  • I confirmed the php version and module in phpinfo() 我确认了phpinfo()中的php版本和模块

With regards Oracle Instant Client, I am not entirely sure what I am doing so here is what I did: 关于Oracle Instant Client,我不能完全确定我在做什么,这就是我所做的:

  • cd /etc/yum.repos.d cd /etc/yum.repos.d
  • (a few steps to get packages) (获取软件包的几个步骤)
  • sudo yum install oracle-instantclient18.3-basic 须藤yum install oracle-instantclient18.3-basic
  • sudo yum install oracle-instantclient18.3-devel 须藤百胜安装oracle-instantclient18.3-devel
  • sudo yum install oracle-instantclient18.3-jdbc 须藤百胜安装oracle-instantclient18.3-jdbc
  • sudo yum install oracle-instantclient18.3-sqlplus sudo yum安装oracle-instantclient18.3-sqlplus
  • sudo yum list oracle-instantclient* ... this confirms the installs sudo yum list oracle-instantclient * ...这确认安装

This is as far as I can get. 据我所知。 I am not sure how to "include it in the library path". 我不确定如何“将其包括在库路径中”。 I am not clear on the next step. 我不清楚下一步。 Please advise 请指教

Thank you 谢谢

As you are using the php72 SCL, you need the php72-php-devel package. 当您使用php72 SCL时,您需要php72-php-devel软件包。

But, why do you want to build from sources, when nearly all extensions are available ? 但是,当几乎所有扩展都可用时,为什么要从源代码构建?

yum install php72-php-oci8

Notice: this package requires the oracle client v18.3 installed, and in the library path. 注意:此软件包需要在库路径中安装oracle客户端v18.3。

PS indeed, the error message probably need to be fixed. PS的确,错误消息可能需要修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM