dongqingchan2385 2017-11-16 14:50
浏览 30
已采纳

为什么Oracle Linux无法识别php包?

I checked here that using php -v or php -i should show my php version. Although, when I type these commands, I got -bash: php: command not found. When I type rpm -qa | grep php I get

php71w-bcmath-7.1.11-1.w7.x86_64
php71w-pdo-7.1.11-1.w7.x86_64
php71w-ldap-7.1.11-1.w7.x86_64
mod_php71w-7.1.11-1.w7.x86_64
php71w-mbstring-7.1.11-1.w7.x86_64
php71w-xml-7.1.11-1.w7.x86_64
php71w-mysql-7.1.11-1.w7.x86_64
php71w-gd-7.1.11-1.w7.x86_64
php71w-common-7.1.11-1.w7.x86_64

And when I type yum provides php | grep php71w (showing all packages that has php command and has php71w on its name) I get

mod_php71w-7.1.8-2.w7.x86_64 : PHP module for the Apache HTTP Server
mod_php71w-7.1.9-1.w7.x86_64 : PHP module for the Apache HTTP Server
mod_php71w-7.1.9-2.w7.x86_64 : PHP module for the Apache HTTP Server
mod_php71w-7.1.10-1.w7.x86_64 : PHP module for the Apache HTTP Server
mod_php71w-7.1.11-1.w7.x86_64 : PHP module for the Apache HTTP Server
mod_php71w-7.1.11-1.w7.x86_64 : PHP module for the Apache HTTP Server

What I'm missing? If mod_php71w-7.1.11-1.w7.x86_64 : PHP module for the Apache HTTP Server has php command and it's listed as installed, why php -v is not recognized?

  • 写回答

1条回答 默认 最新

  • doufan2541 2017-12-12 08:32
    关注

    The PHP Command Line Interface is typically not installed by default. Just find the correct php-cli package for your distro/version and install it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用