How to reset compiling options for a port?

Hi,

I wanted to compile php5 for using it with Apache and not knowing which option I needed I checked most of them. The problem is some options are not compatible embedded and Apache. I had a message telling me that it's not possible but now I'm not asked which option I want anymore. So I'm just trapped with the error message. I tried deleting the directory for php5 and relaunching the command portsnap fetch extract then retrying the command cd /usr/ports/lang/php5/ && make install clean. But, I still go directly to the error message
Code:
===>  php5-5.4.15 cannot be built with multiple SAPI (apache and embedded).
*** Error code 1

Stop in /usr/ports/lang/php5.

I'm a total beginner with FreeBSD OS, I'm sorry if the answer is obvious but I didn't find anything in portsnap's manual. Do you have any solutions?
 
To reset options to default: # make rmconfig. The next time the port is built or you use # make config, the default options screen will be shown.
 
Since you're new around here (welcome!) let me write it out a bit.

The first thing to do when you're wondering about the Ports and their build options is to consult the ports(7) manual page. Here you'll find two interesting targets: rmconfig as well as rmconfig-recursive, the latter will remove the configured settings not only from the port you're currently working with, but also all the ports its depending on.

However, do keep in mind that if you want to change the config options for a port at a later time then you can, quite easily too.

Just re-use the config target: # make config, apply the changes you want and then simply either rebuild (# make build) or re-install (# make reinstall) the port to try it out.

While you're at it I strongly suggest to consider installing ports-mgmt/portmaster, it can make your life so much easier. Including the issue of installing or re-installing ports.

You want to install a port but you don't know from mind if you had already installed it? No problem, let FreeBSD's excellent tools sort it out for you:

# make config
# portmaster lang/php5
(I used PHP as an example because you mentioned that this is what you wanted to change)

It doesn't matter if you're re-installing PHP5 or starting out fresh. portmaster will detect the current state of PHP5 and act accordingly (by (re-)installing it ;) ).

Last word of advice: check the FreeBSD handbook, especially the parts on packages and ports; this explains how you can install, remove, alter software either using Ports or Packages.

The other part is just as important, maybe even a little more so: how to update or upgrade FreeBSD, you really don't want a system which utilizes PHP5 to miss out on (usually) important security patches.

Hope this helps!
 
Back
Top