FreeBSD install Perl language

Q. I need Perl programming language to run scripts. How do I install perl on FreeBSD operating system?

ADVERTISEMENTS

A. Practical Extraction and Report Language or Perl can be installed using FreeBSD ports or binary package system. Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It’s also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).

Install perl using FreeBSD ports

Perl5 port is located at /usr/ports/lang/perl5.8. Type the command as follows to install Perl5:
# cd /usr/ports/lang/perl5.8
# make;make install;make clean

Now perl will be installed and binary path to perl is /usr/local/bin/perl.

Install perl using FreeBSD pkg_add command

Just type the following command:
# pkg_add -v -r perl

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
5 comments… add one
  • Kuris Apr 2, 2010 @ 9:02

    In release 8.x of FreeBSD command is

    pkg_add perl -v -r

    If is package not present, it downloads the latest package from Internet ftp server with distribution..

  • Kuris Apr 2, 2010 @ 9:48

    I must add, it connects at http://ftp.freebsd.org always, and on FREEBSD 8.x
    in directory /usr/ports/lang/ is perl5.8 and perl5.10
    Command make in this directory will instal perl, but it cannot find package and attempt to download it too..

  • Maurício Leite Sep 13, 2011 @ 18:20

    Thank you.

  • Patrick Jan 24, 2013 @ 5:19

    why i get this error?!
    pkg_add: 1 package addition(s) failed

  • Edvaldo Szymonek Feb 23, 2013 @ 22:22

    Thank You! :)

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.