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.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题