FreeBSD install Perl language

by on August 5, 2007 · 5 comments· LAST UPDATED August 5, 2007


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

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

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 5 comments… read them below or add one }

1 Kuris April 2, 2010 at 9:02 am

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..


2 Kuris April 2, 2010 at 9:48 am

I must add, it connects at 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..


3 Maurício Leite September 13, 2011 at 6:20 pm

Thank you.


4 Patrick January 24, 2013 at 5:19 am

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


5 Edvaldo Szymonek February 23, 2013 at 10:22 pm

Thank You! :)


Leave a Comment

Tagged as: , , ,

Previous Faq:

Next Faq: