My installation of R 2.8.1-1 is in progress as I write this. The original instructions for installing R on FreeBSD are at the R Wiki, but before you dash there, you may want to know that I had to make some changes. They are listed below:

First, the good news: on my FreeBSD 7.0 installed in February of 2008, I did not need to make any changes to the PATH, nor did I have to set the symbolic links mentioned in the instructions right after the paragraph that begins with "A word of warning [...]". You may have to, but check first:

# whereis make
# whereis sed

If your system is anything like mine, make and sed are in /usr/bin. Next, you need to check and see if the PATH includes /usr/bin, like so:

# echo $PATH

If the answer is yes, you're OK. If the answer is no, before you make changes to the PATH, check which shell you're using, like so:

# echo $SHELL

The instructions use the "export PATH" command, which is for the bash shell. The csh equivalent of that command is "setenv PATH". Finally, the symlinks mentioned in the instructions map your gsed to sed, but I have no such thing. I have psed instead. You can check what kind of stream editor you have like so:

# ls /usr/local/bin | grep sed

Next, I had to make changes to two files: /etc/login.conf and /boot/loader.conf.

The latter was easy. It used to be empty, and it now contains one line:


In the former, I had to comment out the settings that forwarded the standard user settings to the default, then de-comment the example settings for the standard user, and increase the datasize to 700M. The idea is that by default, the datasize is unlimited. You need to cap it to 700M for the standard user, in order for the gfortran43 port, on which the R port depends, to install with Java support, whatever that is.

I wouldn't have done any of this, but my first attempt at installing R aborted with all kinds of error messages that after a bit of googling pointed me this way. To be safe, before editing /etc/login.conf and /boot/loader.conf I copied them to /etc/login.conf_original and /boot/loader.conf_original. If I screwed anything up, I'll just de-install R and revert to those until I figure out what's wrong.

When you open /etc/login.conf for editing you will see some comments that instruct you to do

# cap_mkdb /etc/login.conf

after you've done your edits. I did. To make sure that the new settings took place, I also restarted the server. That's

# shutdown -r now

And now, like I said, the thing's in progress. It's taking a long time too.