Installing ActivePerl for macOS


  • Hardware: 200 MB hard disk space for typical install
  • Operating System: macOS 10.6 or later

Installing the macOS Package

ActivePerl is distributed on macOS as a disk image (.dmg file). The disk image contains an installer package (.pkg bundle) that installs ActivePerl.

  1. Download the ActivePerl disk image (ActivePerl-<version>-<platform>.dmg).
  2. If the browser does not automatically mount the disk image and open the mounted folder in Finder, double-click ActivePerl-<version>-<platform>.dmg to do so.
  3. Double-click the ActivePerl installer package (ActivePerl-<version>.pkg) to start the installation.
  4. Follow the Installer prompts. The installer will ask for administrative authentication if the current user does not have administrative privileges.
  5. After installation is complete, you may eject the ActivePerl disk image and move ActivePerl-version.dmg to the Trash.

macOS includes a non-interactive command line interface to Apple’s Installer. To install the ActivePerl Apple installer from the command line:

$ sudo installer -pkg /Users/<username>/ActivePerl-<version>.pkg -target /

More information on the command line interface to Installer can be found in its man page.

macOS Configuration

The Apple Installer package installs ActivePerl in /usr/local/ActivePerl-5.24. To run the perl interpreter and PPM package manager (without having to enter the full path), add /usr/local/ActivePerl-5.24/bin to your PATH environment variable. For example:

$ export PATH=/usr/local/ActivePerl-5.24/bin:$PATH
$ export PATH=/usr/local/ActivePerl-5.24/site/bin:$PATH

To permanently add the directory to your PATH, add it to the .profile or .bash_profile file in the user’s home directory. For example:

export PATH

Note: macOS gives no default.

Alternatively, symbolic links to the binaries can be created in any bin directory currently in the PATH. For example:


$ ln -s /usr/local/ActivePerl-5.24/bin/perl /Users/<username>/bin/perl
$ ln -s /usr/local/ActivePerl-5.24/bin/ppm /Users/<username>/bin/ppm

Uninstalling ActivePerl on macOS

To uninstall ActivePerl, run the uninstall script:

$ sudo /usr/local/ActivePerl-5.24/bin/ap-uninstall

Removing ActivePerl will also remove perl modules manually installed using PPM.

If necessary, remove any symbolic links created during configuration. For example:

$ rm /Users/<username>/bin/perl