Category Archives: MacPorts

Solve “mongodb cannot be built while v8 is active” in MacPorts

While updating all the ports of macports I got this error:

--->  Configuring mongodb
Error: mongodb cannot be built while v8 is active.
Error: Please deactivate v8 and try again.
Error: You can reactivate v8 again later.
Error: org.macports.configure for port mongodb returned: v8 is active

To deactivate v8 run:

sudo port -f deactivate v8

Run the update process again:

sudo port upgrade outdated

And finally activate v8 again:

sudo port activate v8

Ref: http://widgetbook.blogspot.com.es/2013/08/mongodb-and-macports-and-v8.html

Fix “macports checking for Tcl configuration… configure: error: Can’t find Tcl configuration definitions” when selfupdating Macports in Mac OS X 10.9 Mavericks

Solucionar "macports checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions" al actualizar Macports en Mac OS X 10.9 Mavericks">

I’ve just upgraded my Mac OS X to Mavericks 10.9. When I tried to update Macports I got an error and when I used the verbose mode of selfupdate (sudo port -v selfupdate) it came out this:

macports checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions

I fixed the problem after reinstalling the Command Line Tools of Xcode and accepting the license from the command line:

sudo xcode-select --install
sudo xcodebuild -license

Then the selfupdate worked just fine:

sudo port selfupdate

Install and activate xdebug in MacPorts

First install php5-xdebug:

sudo port install php5-xdebug

Then just add these in your php.ini (probably /opt/local/etc/php5/php.ini), but first verify the file path for zend_extension option:

; NOTE: This line adds the xdebug extension. The macports install will give you the path, 
; or may even add this automatically. Be smart, look for a similar line in your config first.
; (Edit: 06/22/2012)
zend_extension="/opt/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

; General config
;Dumps local variables on exception
xdebug.show_local_vars=On
;Dump server variables
xdebug.dump.SERVER=*
;Dump global variables
xdebug.dump_globals=On
xdebug.collect_params=4;

; Tracing
xdebug.auto_trace=On
xdebug.trace_output_dir=/opt/local/php_traces/
xdebug.show_mem_delta=On
xdebug.collect_return=On

; Profiler
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/opt/local/php_traces

; Debugging. You might need to specify your host with some additional options
xdebug.remote_enable=1

Ref: http://www.littleblackhat.com/blog/2009/02/getting-xdebug-working-on-mac-os-x-with-macports/

Install Doctrine2 with PEAR in MacPorts

Run those commands:

sudo /opt/local/bin/pear channel-discover pear.doctrine-project.org
sudo /opt/local/bin/pear channel-discover pear.symfony.com
sudo /opt/local/bin/pear install -a pear.doctrine-project.org/DoctrineORM-2.3.3
sudo /opt/local/bin/pear install pear.doctrine-project.org/DoctrineSymfonyConsole
sudo /opt/local/bin/pear install pear.doctrine-project.org/DoctrineSymfonyYaml

Then running doctrine -v should work but /opt/local/lib/php must be in the include_path of your PHP installation. I tried to include it in my /opt/local/etc/php5/php.ini file but didn’t work, so I added this line as the very first line in /opt/local/bin/doctrine.php:

set_include_path(get_include_path() . PATH_SEPARATOR . '/opt/local/lib/php');

Then everything worked fine.

Ref: http://delboy1978uk.wordpress.com/2012/06/26/installing-doctrine-2-2-2-on-mac-os-x/

Useful Apache 2 and MySQL 5 service aliases for MacPorts

Those are some aliases I use to start, stop and restart Apache 2 and MySQL on my MacPorts installation done with the installation script I made some time ago. You have to edit “~/.bash_profile” file and add those lines:

alias mysql5start='sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start'
alias mysql5stop='sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop'
alias mysql5restart='sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper restart'

alias apache2start='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start'
alias apache2stop='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop'
alias apache2restart='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart'

Then execute “source ~/.bash_profile” to load the new aliases or just open a new terminal window.

  • Page 1 of 2
  • 1
  • 2
  • >