pkg php5 issue

Hello,

I installed php5 using the pkg tool so it should be up to date but the output from pkg version is following:

Code:
# pkg version|grep php
php5-5.4.40  <

Also I'm not able to upgrade that package:

Code:
# pkg upgrade -f php5
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 4 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
   php5-5.4.40
   libxml2-2.9.2_2
   libiconv-1.14_8
   pcre-8.35_2

My version of FreeBSD is following:

Code:
9.2-RELEASE-p4 FreeBSD 9.2-RELEASE-p4 #0: Tue Apr  8 18:05:06 UTC 2014  root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

Please advise.
 
Packages are only built once a week. It looks like you already built it from ports, so it's probably a little newer than the package repository.
 
Thank you for replying. I had php5 installed via ports but then I removed it and installed it from scratch using the pkg tool.
Also do you know if there is any way to make php5 to point to lang/php56 instead lang/php5? I'm asking because I want to install roundcube also but it needs php56.
 
This only works when building from ports but you can set various default versions using /etc/make.conf:
Code:
DEFAULT_VERSIONS+= php=56
See /usr/ports/Mk/bsd.default-versions.mk for more.
 
Thank you SirDice. I wonder which is the most proper method to install ports/packages on FreeBSD. I like the pkg tools because there is no need to build everything from source but in the same time I've got problems because of that. For example the dovecot package coming with the pkg tool doesn't support SQL. What do you do in situations like this one? Build only that package from ports and continue using the pkg tools for the other packages?
 
If you only need the default options then you should use the packages. If you need to change the options to something like SQL support in dovecot then ports is better. Both of them, packages and ports, use the same options but you have more flexibility with ports if you need to have extra or less features compiled in. I mainly use packages as it saves time and less dependencies too.

If you happen to install using packages and realized you need to change the options then you can set the options in the ports then use ports to reinstall the software.
 
In the past, lang/php5 pointed to the default PHP version. It doesn't seem like that will be done anymore as the default was changed to PHP 5.6 and the lang/php56 port was used for that. In this case, the issue may be using pkg upgrade -f php5. Even if the command is there, updating individual ports has never been a supported task. If you run pkg upgrade then the updated Roundcube package should say that it needs to remove php5 and related ports and install php56 as part of the upgrade.
 
Back
Top