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

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

On this topic:


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

"Ports" went altogether from FreeBSD systems, and since the poppy is also some heir to this architecture, there are also in it. What are the "ports" and how they work in Leopard.

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

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

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

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

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

We will mount and install, all the program was installed (updated) to the latest official version, now we will begin to work directly with it. Run the console and go to the root (root) mode through the command "su", run the command "port" and check the version with 1.7.1:

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

All is well, the versions coincide and we are in interactive mode.

Now we will install a program, for example, I recently looked for a hydra under Leo, and she is here and waits for her hour for installation :)

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

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

We will see many available programs, but we are looking for hydra, we will type "info hydra" and find out that it is present in the repository :)

Through the command "info" 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 there is a nice portability, the installation program will do everything by itself - load and Install all the libraries and the necessary files, but just enter the "install hydra" command and wait for the installation to complete :) All installation was completed, open a new console window and enter "hydra" :

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

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

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

To all useful and successful instalov :)