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 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程