0

I ran the following commands twice to ensure it's installed:

yum install php72 php72-cli returns

Package php72-1.0-1.el7.remi.x86_64 already installed and latest version

now running php -v returns

-bash: php: command not found

Note: This is on Vagrant running centos/7 box.

Any ideas?

3
  • 2
    It depends from what repository those packages originate. For example, if you install something from SCL those packages typically go into /opt and therefore binaries do not (automatically) appear on PATH. Simply run yum whatprovides */php or (more ugly but still my favorite) find / -name php 2>/dev/null and check where the php binary really is and if you have that directory on your PATH.
    – Fiisch
    Commented Oct 28, 2018 at 19:55
  • @Fiisch You are quite a legend. Post that and i'll accept.
    – IMB
    Commented Oct 28, 2018 at 20:07
  • Added as answer. :)
    – Fiisch
    Commented Oct 28, 2018 at 20:39

1 Answer 1

1

It depends from what repository those packages originate. For example, if you install something from SCL those packages typically go into /opt and therefore binaries do not (automatically) appear on PATH.

Simply run yum whatprovides */php or (more ugly but still my favorite) find / -name php 2>/dev/null and check where the php binary really is and if you have that directory on your PATH.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .