2.2.2 Installing under Linux

Mandatory installation steps.

The linux distribution of Free Pascal comes in three forms:

If you use the .rpm format, installation is limited to

rpm -i fpc-X.Y.Z-N.ARCH.rpm

Where X.Y.Z is the version number of the .rpm le, and ARCH is one of the supported architectures (i586, x86_64 etc.).

If you use Debian, installation is limited to

dpkg -i fpc-XXX.deb

Here again, XXX is the version number of the .deb le.

You need root access to install these packages. The .tar le allows you to do an installation if you don't have root permissions.

When downloading the .tar le, or the separate les, installation is more interactive.

In case you downloaded the .tar le, you should rst untar the le, in some directory where you have write permission, using the following command:

tar -xvf fpc.tar

We supposed here that you downloaded the le fpc.tar somewhere from the Internet. (The real lename will have some version number in it, which we omit here for clarity.)

When the le is untarred, you will be left with more archive les, and an install program: an installation shell script.

If you downloaded the les as separate les, you should at least download the install.sh script, and the libraries (in libs.tar.gz).

To install Free Pascal, all that you need to do now is give the following command:

./install.sh

And then you must answer some questions. They're very simple, they're mainly concerned with 2 things :

  1. Places where you can install dierent things.
  2. Deciding if you want to install certain components (such as sources and demo programs).

The script will automatically detect which components are present and can be installed. It will only oer to install what has been found. because of this feature, you must keep the original names when downloading, since the script expects this.

If you run the installation script as the root user, you can just accept all installation defaults. If you don't run as root, you must take care to supply the installation program with directory names where you have write permission, as it will attempt to create the directories you specify. In principle, you can install it wherever you want, though.

At the end of installation, the installation program will generate a conguration le (fpc.cfg) for the Free Pascal compiler which reects the settings that you chose. It will install this le in the /etc directory or in your home directory (with name .fpc.cfg) if you do not have write permission in the /etc directory. It will make a copy in the directory where you installed the libraries.

The compiler will rst look for a le .fpc.cfg in your home directory before looking in the /etc directory.