While building Apache port I was presented with a menu from which I selected certain build options. However, certain option giving out error as follows:
===> apache-2.2.8 mod_mem_cache requires WITH_THREADS.
*** Error code 1
All I wanted to do is disable mod_mem_cache and build Apache again. Unfortunately, it is not allowing me to clear out configuration option. How do I remove all selected options and allow me to start over again?
There are many ways to clear out configuration options under FreeBSD. make command offers various options to revisit CONFIG menu to add, remove, or change options after a port has been built.
make rmconfig option
The simplest one is type command make rmconfig. First login as root; go into the directory containing the port and type:
# cd /usr/ports/www/apache22
# make rmconfig
Output:
===> Removing user-configured options for apache-2.2.8
Use 'make config' to modify settings
Another option is type make config.
# make config
# make install clean
To display OPTIONS config for port, enter:
# make showconfig
See the man page ports for more information:
$ man ports
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 13 comments… read them below or add one }
Thanks! I still find it hard to find the right documentation on how to use these ports-commands on FreeBSD…
Can’t remember I ever heard of “rmconfig”.
BOK,
man ports has all info.
THANK YOU! THANK YOU!!!
This has solved my problem with apache giving me hell about openldap! Just took out that option and it compiled cleanly!
Thanks!
Big thanks to you!
Really solving my problem!!
Thank you for this tip. Helped alot ;)
is there a way to do make rm config for the whole ports tree?
Installed port options are located in a file called “options” in the directory named /var/db/ports/”portname”.
To remove an individual ports options remove that ports directory
ex: # rm -rf /var/db/ports/apache22
To remove all the ports options then remove all the sub-directories.
thanks a lot for this tip, i have problems compiling gpg and this tip save me a lot of time
Thanks for the info – btw., you have a typo – it’s not ‘make ports’ but ‘man ports’.
– regards,
Denis
Thanks for the heads-up!
find . -type d -iname ‘p5-*’ | while read d ; do pushd . ; cd $d ; make rmconfig ; popd ; done
To remove configuration from all subdirectories, beginning with ‘p5-’
find . -type d -iname ‘p5-*’ | while read d ; do pushd . ; cd $d ; make rmconfig ; popd ; done
Thank you! This tip help-me a lot!
Regards!