Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed FreeBSD 9 and I need to install phantomjs. It is available in /usr/ports/lang/phantomjs but the version is 1.0 while I need a more recent version. There is a patch to update to version 1.4.1 but I don't know how to apply this patch. I've googled this and read the FreeBSD Porter's Handbook several times but I'm still lost.

Also there is no entry about phantomjs in /usr/ports/UPDATING file.

Thanks for your help.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You need to update your port tree. Run:

portsnap fetch update

If you want to keep your port tree updated on a regular basis you can create a periodic script.
This is the script I use on my dev machine, /usr/local/etc/periodic/weekly/910.portsnap

#!/bin/sh -

# If there is a global system configuration file, suck it in.
if [ -r /etc/defaults/periodic.conf ]
    . /etc/defaults/periodic.conf

case "$weekly_portsnap_enable" in
        echo ""
        echo "Updating ports tree via portsnap:"

        portsnap cron update | grep -v /;;

    *)  rc=0;;

exit $rc

Don't forget to chmod+x 910.portsnap and add weekly_portsnap_enable="YES" to your /etc/periodic.conf file.

share|improve this answer
If ever anyone is interested in running phantomjs 1.6.1, intructions provided at works perfectly with FreeBSD9 and clang. Unfortunately, you'll have to build by hand, as port tree only contains version 1.4, which the subbject of the question. – user130370 Aug 3 '12 at 15:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.