Tag Archives: portmaster

Install Hack font on FreeBSD 10

FreeBSD 10 comes with a pkgng package manager which allows to install binary packages faster and easier.

Unfortunately, there is no binary package available for hack-font for FreeBSD 10. What is hack-font? It’s a very good font which looks very good for source code.

Here’s how to install it from source.

Check /usr/ports/x11-fonts to see if there is a directory named hack-font. If not, you might need to download or update the ports first. If you don’t have ports installed at all, do this:

# portsnap fetch
# portsnap extract

If you already have ports install previously, but just need to run the update:

# portsnap fetch update

Then navigate to /usr/ports/x11-fonts/hack-font, run make command as the following:

# cd /usr/ports/x11-fonts/hack-font
# make install clean

That’s it. If you use portmaster command to install package from source, you probably can just run:

# portmaster x11-fonts/hack-font

Enjoy hack-(font)ing!

Upgrade existing Perl 5.12 to Perl 5.18 on FreeBSD 9

Recently I’ve been trying to update the perl package on my FreeBSD box to the latest version 5.18 without any success. Here’s a snippet of the error message:

Creating various symlinks in /usr/bin...
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl5
Installing perl5.18-5.18.1_2...pkg-static: perl5.18-5.18.1_2 conflicts with perl-5.12.5 (installs files into the same place).  Problematic file: /usr/local/bin/a2p
*** [fake-pkg] Error code 70
Stop in /usr/ports/lang/perl5.18.
*** [install] Error code 1

Stop in /usr/ports/lang/perl5.18.

===>>> Installation of perl5.18-5.18.1_2 (lang/perl5.18) failed
===>>> Aborting update

===>>> Killing background jobs

===>>> You can restart from the point of failure with this command line:
portmaster lang/perl5.18

===>>> Exiting

So I turned to Google to see if other people experienced the same thing as me. According to an answer to a similar question about upgrading perl on serverfault.com, one should read


document frequently.

Let’s do it.

pkg updating | less
  AFFECTS: users of lang/perl5.12 lang/perl5.14
  AUTHOR: mat@FreeBSD.org

  The default perl has been switched to lang/perl5.16. If you're using binary
  packages, you need to do :

  # pkg set -o lang/perl5.14:lang/perl5.16

  If you're not using binary packages and want to (and should) switch, if
  you're using perl-5.14, for instance :

  Portupgrade users:
    0) Fix pkgdb.db (for safety):
        pkgdb -Ff

    1) Reinstall new version of Perl (5.16):
        portupgrade -o lang/perl5.16 -f perl-5.14.\*

    2) Reinstall everything that depends on Perl:
        portupgrade -fr perl

  Portmaster users:
        portmaster -o lang/perl5.16 lang/perl5.14

        portmaster p5-

        Comprehensive (but perhaps overkill):
        portmaster -r perl-

  Note: If the "perl-" glob matches more than one port you will need to specify
        the name of the Perl directory in /var/db/pkg explicitly.

I’m using Portmaster, and I’d like to upgrade from perl5.12 to perl5.18.

# portmaster -o lang/perl5.18 lang/perl5.12

…and after a very long wait, this was the result:

===>>> Updating dependency entry for perl5.18-5.18.1_2 in each dependent port

===>>> Delete perl/perl-5.16.3.tar.bz2? y/n [n] y

===>>> Delete old and new distfiles for lang/perl5.12
       without prompting? y/n [n] y

===>>> Installation of lang/perl5.18 (perl5.18-5.18.1_2) complete

===>>> Exiting

There you go. If there’s only thing you can take from this post is that if you upgrade packages from sources very often on FreeBSD, you really should check the /usr/ports/UPDATING.