Tag mac os x

Read about the posts of tag mac os x

Mac OS X related posts. Our day to day hardware are apple based, most of our post are for Mac OS X

Node.js is actually an essential tool for every developer. Basically are a javascript interpreter for a command line. This is very interesting because allows executing javascript in any environment; you can make server-side applications, command-line tools, webs, etc. An actually have a lot of followers, apps, frameworks to work with it. This ecosystem is incredible and make it easier life when you work with it.


But Node isn’t alone. Come with another powerful tool called npm. Npm is a package manager that allows installing of third party libraries in javascript. For development, this is amazing because you could have an entire development environment in minutes.

Let’s do install Node.

Install Node

you have two ways to install in Mac OS X.

Use Installer

The easiest way to install a node is with the package manager.

  1. Go to https://nodejs.org/en/download/
  2. Download Mac installer version
  3. Execute and follow step by step

Use Homebrew

Homebrew is defined as a package manager that OS X should have. First, we need to install homebrew. Open a terminal window and write:

After some text, you can test it works:

Now we can install Node:

And after some more text, you will be Node.JS installed.

Test It

If you open a terminal and write:

You will have the version output:

Why use Homebrew instead Installer

Why is better to use homebrew instead of the installer? Easy, you need administrative privileges to install, this means use Sudo to install with package installer and are a big problem for working with it. You will need to use Sudo in front of the node and this one doesn’t like execution with root privileges. To avoid this problem use Homebrew to install it.

One of the worst things that could have happened to me upgrading to Mac OS X 10.10.1 Yosemite is the fact that reset the configuration of Apache / PHP. Basically, deleted the php.ini file (among other things) and get text and mcrypt libraries.

The first thing we do is install gettext in Yosemite. I am not sure if this step is absolutely necessary.

I usually work in the tmp folder and restarting the Mac (though I do not ever do) is automatically deleted. We open the Terminal and put:


Download gettext-tools

In my case, the version 0.19.3, enter into the folder and compile:

Now that we have gettext-tools, compile PHP extensions. For this, use GIT:

Again tmp:

And download the PHP sources :

It will be one while downloading code, the PHP project is not tiny. We switched to the branch of our version of PHP:

And finally, compile the extension:

Now we have the extension, copy the folder extensions:

The folder name may vary depending on the version of OS X.

Now edit php.ini (if you do not have php.ini cp /etc/php.ini.default /etc/php.ini):

Go to the end of the file and add:


Now, the extension mcrypt. The process is identical to gettext:

Copy of the folder the extensions:

Now edit php.ini :

Go to the end of the file and add:

Restart apache:


Yosemite is fast, Yosemite is nice but has not taken into account, in any case, developers who use the Mac as a development environment.