Skip to content

Instantly share code, notes, and snippets.

@nhahv
Created July 26, 2015 18:09
Show Gist options
  • Save nhahv/0e506e8333fbff08ea5f to your computer and use it in GitHub Desktop.
Save nhahv/0e506e8333fbff08ea5f to your computer and use it in GitHub Desktop.
PHP-CLI Anternatives HHVM on Ubuntu

Check what alternatives are there for the php:

$ sudo update-alternatives --list php
/usr/bin/hhvm
/usr/bin/php5

If you don't want to keep hhvm as an option at all, you can do:

$ sudo update-alternatives --remove php /usr/bin/hhvm
update-alternatives: removing manually selected alternative - switching php to auto mode
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode

This will revert your system to original state. If you want to keep the hhvm, then just change the active alternative:

$ sudo update-alternatives --set php /usr/bin/php5
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in manual mode

and that's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment