This page has been robot translated, sorry for typos if any. Original content here.

We work with ports or how to install programs from the console without problems in Mac OS X

On this topic:


Recently I figured out how the "ports" in Leopard work, figured out and decided to write an illustrated tutorial for the people on this topic.

The "ports" went generally from FreeBSD systems, and since the poppy is also a kind of heir to this architecture, they also exist in it. What are “ports” and how do they work in Leopard.

Ports is a FreeBSD software solution for installing third-party programs distributed both in source codes (the usual way in the UNIX world) and in binary files (for closed-source projects). The port includes the files necessary for the proper compilation, installation and operation of the application under FreeBSD. Currently, the collection of ports includes about 19,000 applications for various purposes. (c) Wiki

So we already know that these are repositories with the source code of the programs that we can collect at Leo in just a few minutes, there are a lot of programs, so that everyone can find for himself everything he needs to work.

The first thing we need is to install (update) a program that works with ports, so that we have the current version, go to http://www.macports.org

Работаем с портами или как установливать программы из консоли без проблем в Mac OS X

We go to the installation section and download the MacPorts-1.7.1-10.5-Leopard.dmg package for Leopard.

We install and install, we installed (updated) the entire program on the latest official version, now we will start working directly with it. We launch the console and switch to root mode via the "su" command, run the "port" command and check the version from 1.7.1:

Работаем с портами или как установливать программы из консоли без проблем в Mac OS X

Everything is fine, the versions are the same and we are online.

Now we’ll install some kind of program, for example, I recently looked for a hydra under Leo, and she is here and is waiting in the wings for instal :)

In order to view the entire list of programs available for installation, type the "list" command:

Работаем с портами или как установливать программы из консоли без проблем в Mac OS X

We will see many available programs, but we look for hydra, type “info hydra” and find that it is present in the store :)

Through the "info" command we can get information about any of all these programs, from the screenshot we see that the program depends on two libraries without which of course it will not work, but this is a nice feature of the ports, the installation program will do everything itself - it will load and install all the libraries and the necessary files, but all that remains is to enter the "install hydra" command and wait for the installation to complete :) All installation is completed, open a new console window and enter "hydra" :

Работаем с портами или как установливать программы из консоли без проблем в Mac OS X

The program has been successfully installed, you can use it. As you saw, the installation program went smoothly and painlessly.

The tutorial is written in easy language, I think you have mastered everything and understood for yourself something else from the "hidden" features of Leopard.

All useful and successful instals :)