There are lots of great open source software packages available for free. Installing these is sometimes a really hard task. MacPorts greatly simplifies the compiling and installing of open-source software on your Mac. You do not have to download any source code and compile it yourself. Just let MacPorts install the software for you.
There are really a lot of great software packages available for your Mac. The best aspect is that these programs don't cost you a dime. Here is a small subset of freely available software packages you can install through MacPorts:
Before we can install any of the above programs we need to install MacPorts itself.
You can check whether you have MacPorts installed on your Mac by launching the Terminal application and then entering the command
port at the prompt. This will enter the interactive mode of MacPorts, where you can request help, or search for packages to install. You can leave the interactive mode by entering
quit at the MacPorts prompt in the Terminal.
If MacPorts is not installed you will get an error message like the following:
-bash: port: command not found
There is also a MacPorts GUI application available, but I have never used it. I would argue that you do not need it. Using MacPorts on the command line is easy. And if you run into any issues, I'm here to help you.
Let us now go through the process of installing a program with the
port command. I will show you how to install ImageMagick, because I will use it in an upcoming tutorial.
ImageMagick is a software suite to convert, edit, and compose images. ImageMagick is not your typical image editor, as the functionality of ImageMagick is usually utilized from the command line. This makes it the ideal application to automate all of your image manipulation needs.
To install ImageMagick we search for the correct port in the Terminal with the following command:
port search imagemagick
You should get a list of ports matching your search criteria, as you can see in the screenshot below:
To install the ImageMagick port enter the following command:
sudo port install ImageMagick
This will install ImageMagick on your system. You can see if the installation was successful by issuing the command
/opt/local/bin/convert --version. convert is part of the ImageMagick suite. By default MacPorts installs all software in the folder
/opt/local/bin/. Make sure this is in your PATH environment variable.
Have you seen the watermark in the screenshot above? I will show you how you can watermark your images with ImageMagick in one of the next tutorials. So stay tuned.
If MacPorts is installed, but outdated, you might get a warning like this one:
Warning: port definitions are more than two weeks old, consider using selfupdate
You can update MacPorts with the following command:
sudo port -v selfupdate
You need to run the update with root privileges. Therefore, we use the
sudo command. You will be prompted for your root password. Depending on the already installed ports the update can take quite a while.
Posted on CuteMachine.