How do I install all the dependencies needed for the PHP package without installing the actual package for APT?

link|improve this question
feedback

2 Answers

up vote 2 down vote accepted

Install the PHP package with all the dependencies, then uninstall the PHP package.

link|improve this answer
Heh, fair enough :) – Nick Brooks Dec 14 '10 at 21:50
feedback

Using apt-get: apt-get -s install name_of_PHP_package shows what extra packages will be installed. To automate:

LC_ALL=C apt-get -s install |
awk '/^[^ ]/ {p=0}
     p {print}
     /^The following extra packages will be installed:/ {p=1}'

Using aptitude interactively: mark the PHP package for installation, press g, mark the automatically selected packages as manually requested with m, remove the initial package from the to-install list with -, and finally confirm the installation request with g again.

link|improve this answer
+1 for the aptitude solution. I'm certainly not apt enough about apt. – fideli Dec 15 '10 at 0:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.