Installing ActivePerl for Linux

Prerequisites

  • Hardware: 250 MB hard disk space for typical install
  • Operating System: Linux distribution using glibc 2.15 or later (e.g. Ubuntu 12.04)
  • Online Help: Web browser
  • Check the LD_LIBRARY_PATH variable and unset any references to Perl & Lib if these are set

Installing ActivePerl on Linux

The installer allows installation as an unprivileged user into a user-specified path. GNU tar is required for extracting the files. See Known Issues in the ActivePerl Release Notes for details.

Warning: Do not use package managers to install ActivePerl as these use a different algorithm and will corrupt the tarball file.

Download the distribution to a temporary directory, extract the files, switch to the extracted ActivePerl directory and then run the install.sh installation script. The installation script will prompt you to accept the license agreement and to specify the target installation directory.

% tar zxf ActivePerl-<version>.tar.gz
% cd ActivePerl-<version>/
% sudo ./install.sh

Configuring your PATH and man page locations

Global configuration

We suggest adding the following line to your shell configuration file (e.g. .profile or .bash_profile). If you chose a different install location, you need to adjusts the paths to point to your perl directories.

PATH = /opt/ActivePerl-5.22/site/bin:/opt/ActivePerl-5.22/bin:$PATH
PATH = /opt/ActivePerl-5.22/site/man:/opt/ActivePerl-5.22/man:$PATH

Home directory configuration

If you share the system with other people, or if you do not have root access, it is recommended that you install ActivePerl in your own user directory. For example:

/home/<username>/ActivePerl-5.22

We suggest adding the following line to your shell configuration file (e.g. .profile, .bashrc, or .cshrc) file to auto-load this path whenever you open a new terminal window, log on, etc.:

PATH=$PATH:/home/<username>/bin

And create the bin directory if it does not exist, and finally create symbolic links to the binaries:

mkdir /home/<username>/bin
ln -s /home/<username>/ActivePerl-5.22/bin/perl /home/<username>/bin/perl
ln -s /home/<username>/ActivePerl-5.22/bin/ppm /home/<username>/bin/ppm

This will allow you to run a Hello World! example using ActivePerl:

perl -e 'print "Hello World!\n"'

Uninstalling ActivePerl on Linux

Uninstalling an “AS Package” installation is as simple as removing the directory to which you ActivePython installation is fully contained in the install location, so you can uninstall it by deleting the folder and removing any changes you made to your shell configuration file or symbolic links. For example:

sudo /bin/rm -rf /opt/ActivePerl-5.22
rm -rf /home/<username>/bin/perl
rm -rf /home/<username>/bin/ppm