Ho to deal with a port conflict involving PHP 5 and Pear?

Posted on 2006-04-10
Last Modified: 2013-11-22
Hello all,
I am a witless monkey when it comes to FreeBSD, so bear with me.
I have a server with PHP5 as an apache module on apache-1.3.33_2

mod_php5-5.1.2_1,1  PHP Apache Module

Presently I want to install PEAR, and I can't tell if it is already installed. I looked for it using
pkg_info |grep pear

and didn't find anything so I am assuming that it is not installed.

I went to and it seems that my next bet is to try to install the Pear Package Manager.
I went to my ports directory and found the pear package manager port.

---from the FreeBSD Website-----------------
    PEAR class to maintain PEAR packages
    Long description | Package | Sources | Main Web Site
    Maintained by:
    Requires: apache-1.3.34_4, expat-2.0.0_1, libgnugetopt-1.2, pear-1.4.6, php4-4.4.2_1, php4-pcre-4.4.2_1, php4-xml-4.4.2_1, rc_subr-1.31_1
    Also listed in: Devel, Www

WHen I try to make this however, I get the following error:
===>    Verifying install for /usr/local/share/pear/PEAR.php in /usr/ports/devel/pear
This port requires the CLI or the CGI version of PHP, but you have
already installed a conflicting PHP port without them.
*** Error code 1

So essentially I have a port conflict. I think my question is more general than what I am asking. Which might be "How do you deal with a port conflict when trying to install a port with a conflicting dependency?" I really don't want to revert my PHP installation to  php4-4.4.2_1 but how else am I supposed to install the pear package manager?

I suppose I might be able to install it from source, but won't that negate the benefits of using the FreeBSD package manager?

Any good places for me to look up information on dealing with port conflicts? Links are fine too.


Question by:chicocarlucci
    LVL 61

    Expert Comment

    There is PHP as command line tool. Pear uses it.
    Deinstall mod_php5 and replace it with php5 , which includes both php module and command line php.

    Author Comment

    THanks gheist, but as you see above -
    The pear package file manager is stating that it requires

    Which will conflict with any other version of PHP that I try to install. Which makes the pear package manager install fail entirely. So I'm pretty sure we're back to where we started again: How do you rectify port conflicts when installing packages in FreeBSD?


    LVL 61

    Accepted Solution

    it is happy when it finds /usr/local/bin/php

    after you are done with pear install sysutils/portupgrade and run pkgdb -F to resolve broke dependencies (if it really insisted on php4)
    LVL 61

    Expert Comment

    No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
    I will leave the following recommendation for this question in the Cleanup topic area:

    Accept gheist http:#16429255

    Any objections should be posted here in the next 4 days. After that time, the question will be closed.

    EE Cleanup Volunteer

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
    About FreeBSD Jails In FreeBSD, jails are a way of doing operating system level virtualization.  The basis of FreeBSD jails is chroot (, which changes the root directory of processes.  As a…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now