0

I have installed PHP 5 from source for various reasons (mostly because readline is broken in the Debian packages, and we use that for tab completion in a CLI backend).

When I run apt-get update && apt-get upgrade to update the server, packages that depend on php update themselves, and .... re-install PHP from the repo. This, of course, breaks readline and a number of other things because I don't have all the various php-xxx packages installed (because I compile from source).

Question is: how do I either a) tell Debian don't install PHP 5 - I have it already or b) tell Debian "I know that apt just installed the repo packages, but don't use them. Use the compiled versions, please"?

Right now my solution is to just re-run the scripts I use to compile PHP, but that takes 10+ minutes each time. And, I have to remember to do it! I would prefer to set it and forget it.

chicks
  • 3,793
  • 10
  • 27
  • 36
DrDamnit
  • 348
  • 5
  • 18
  • [GaaS](https://www.google.co.uk/search?q=apt-get+exclude+packages) https://askubuntu.com/questions/18654/how-to-prevent-updating-of-a-specific-package – user9517 Jun 13 '16 at 05:57

1 Answers1

0

This should be pretty simple. Just do "sudo apt-mark hold php*" or "echo php* hold | dpkg --set-selections" and update afterwards. All packages should get updated except php.

Cheers!

runyoufreak
  • 184
  • 1
  • 6