I have php 5.2.12 installed on FreeBSD 8.0-STABLE. It was installed from ports and I am trying to upgrade it to 5.3.2.

However for some reason my system is not recognising that php was installed via ports. When I run "pkg_version" the list does not include php it does however include all the extensions that I have installed.

I have even tried to do "make deinstall" on "/usr/ports/lang/php5" it told me that the port had been deinstalled but php still appears to be working correctly i.e "php -v" works

any ideas on how this port has become de attached from the ports system? and how I can get the ports system to recognise that it installed php?

EDIT: When I run "make deinstall" over and over again I always get the same answer

Deinstalling for lang/php5

I never get

php52 not installed, skipping

which is what I am expecting after the first time I run "make deinstall"


If you're in lang/php5 then you're uninstalling PHP 5.3; you need to be in lang/php52 to uninstall PHP 5.2

  • I get this "php52 not installed, skipping" when running make deinstall in lang/php5 and lang/php5 currently contains 5.3.2 not 5.2 – Alistair Prestidge Jun 14 '10 at 10:01
  • Correct. To deinstall 5.2 you must be in the /usr/ports/lang/php52 directory. You can not uninstall 5.2 from the 5.3 (or 5.0, depending on how current your ports tree is) directory. The two versions are not in the same directory. – Chris S Jun 14 '10 at 12:43

Roughly speaking, PHP 5.3.2 was only recently introduced to the FreeBSD ports tree and in order to properly install 5.3.2, you must first update your local ports tree using csup or cvsup. Have you gone thru these steps first?

  • ran cvsup several times lang/php5 says it has php 5.3.2 but some some reason my system does not recognise that php is installed at all – Alistair Prestidge Jun 14 '10 at 10:03

I am not sure why but the answer was to rebuild all of the ports

portupgrade -a

after running this pkg_version now realises that php is installed.

Fortunately this is not a production machine so this was not a problem if I get this happening on a production machine I think I will need a better answer so, if anyone has an explanation as to why portupgrade -a might have fixed my issue that would be very helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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