pkg cannot install both php5-pgsql and postgresql 9.3 server by default?

Dale Scott dalescott at shaw.ca
Tue Sep 23 12:27:36 UTC 2014


> On Sep 23, 2014, at 2:34 AM, Matthew Seaman <matthew at freebsd.org> wrote:
> 
>> On 09/23/14 08:53, Nagy László Zsolt wrote:
>> I need postgresql server 9.3 because I need to use materialized views. I
>> also need to access that server from PHP. But pkg won't install them
>> both at the same time. See below.
>> 
>> How to overcome this problem? Should I compile php5-pgsql from the ports
>> tree? But then I'll be mixing binary packages with ports, isn't that a
>> problem?
>> 
>> Thanks
>> 
>>    Laszlo
>> 
>> 
>> 
>> root at gw:~ # php install php5-pgsql
>> Could not open input file: install
>> root at gw:~ # pkg install php5-pgsql
>> Updating FreeBSD repository catalogue...
>> FreeBSD repository is up-to-date.
>> All repositories are up-to-date.
>> Checking integrity... done (1 conflicting)
>> Checking integrity... done (0 conflicting)
>> The following 4 packages will be affected (of 0 checked):
>> 
>> Installed packages to be REMOVED:
>>        postgresql93-client-9.3.5
>>        postgresql93-server-9.3.5
>> 
>> New packages to be INSTALLED:
>>        php5-pgsql: 5.4.32
>>        postgresql92-client: 9.2.9
>> 
>> The operation will free 16 MB.
>> 
>> Proceed with this action? [y/N]: n
>> root at gw:~ #
> 
> Yes, currently if you want to use non-standard version of postgresql or
> other programs, then you need to compile them yourself -- and also the
> other ports that depend on postgresql.  Yes, you can do this: the old
> folk wisdom about "don't mix packages and ports" is outmoded now we are
> living in the bright new dawn of pkg(8).
> 
> Just be aware of the time lag between ports being updated in the tree
> and compiled packages hitting the repositories (about 4 to 10 days
> depending).  Building your own packages with poudriere and creating your
> own local repo is highly recommended for this -- you can easily just
> build the packages you want to customize (non-standard options,
> different versions etc.) locally, but rely on the generic packages for
> anything else.

I've found using "pkg lock" on the "built from ports" packages is good enough for my needs (to stop pkg from updating a custom built port with a default package), and avoids having to learn Poudriere (and rumours say an upcoming release of pkg will be smart enough to rebuild custom built ports automatically).



More information about the freebsd-questions mailing list