Toby Asked: 2011-12-17 02:14:19 +0800 CST2011-12-17 02:14:19 +0800 CST 2011-12-17 02:14:19 +0800 CST How do I find out how PHP was installed 772 Is there a way to work out if PHP was installed as part of a generic apt-get package, compiled from source or installed some other way on Ubuntu? I need to recompile it with some more options and I want to try and follow the correct upgrade path. ubuntu php 2 Answers Voted Best Answer Stone 2011-12-17T02:29:09+08:002011-12-17T02:29:09+08:00 You can check if the package is installed with: dpkg -l |grep php and can check if the files on your system is consistent with the package with debsums packagename from this you can have some clues about the origin of the package. m0ntassar 2011-12-17T02:28:34+08:002011-12-17T02:28:34+08:00 you may want to run as root root@machine:~# dpkg -l php5 (or whatever version you have) if php was installed using packet manager, this command will retun some thing like root@machine:~# dpkg -l php5 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-======================================-======================================-============================================================================================ ii php5 5.3.2-1ubuntu4.10 server-side, HTML-embedded scripting language (metapackage) notice the content of the first comumn wich is "ii" else , you will have the same output but with the first column containing "un" instead of ii
You can check if the package is installed with:
and can check if the files on your system is consistent with the package with
from this you can have some clues about the origin of the package.
you may want to run as root
if php was installed using packet manager, this command will retun some thing like
notice the content of the first comumn wich is "ii" else , you will have the same output but with the first column containing "un" instead of ii