AFNI installation: recent updates

The installation steps for OS X have been modified,
mostly due to homebrew dropping support for PyQt4.
Please see (for Linux as well):

There is now a macosx_10.7_local package that has
no shared library requirements besides the typical X11
libraries coming with XCode and XQuartz.

For those attending an AFNI bootcamp, the section
“Prepare for an AFNI Bootcamp” should be completed,
as well.

  • rick


I’ve been going through the latest installation instructions in preparation for next week’s bootcamp (I’m on a Mac OS 10.11.6), and I’ve run into trouble at step 3. I already have XQuartz installed (and I just updated it), and Step 2 (AFNI installation) appeared to be completed, yet when I run “sudo rPkgsInstall -pkgs ALL”, I get the following error:

sudo: rPkgsInstall: command not found

I already have R version 3.3.2 installed. I decided to move on to the next steps to see if they would help this issue; the PyQt4 installation seemed to work, but then “suma -update_env” and “ -check_all” gave me “command not found.” This leads me to think that AFNI did not install correctly in step 2.

Perhaps I’m missing something obvious…should I be copying and pasting the commands into Terminal exactly as they appear in the instructions, or should I be editing something?

Also, in case you weren’t aware, the “FAQ and debugging common error messages” is blank; it just says “EDIT.”

It is just that PATH is not yet updated. Try running
that program directly:

~/abin/ -check_all

Then we don’t have to guess your shell.

If that works, please send the output via email to
our afni.bootcamp address, from which you should
have received a message last night.

If that is not clear, feel free to mail me directly, or
even just post it if you want to.


  • rick

Ok, it turns out I was missing something obvious, which was (apparently) that I had to run the commands starting with Step 2 through an XQuartz terminal rather than the Terminal app. I’m going to leave my previous post here in case anyone else is as clueless as I am, and perhaps it’s worth updating the instructions so that this is more explicit.

That isn’t quite correct. The advantage in opening
an XQuartz terminal is that your PATH was fixed
by starting a new shell. Opening a new Terminal
window should have helped, too.

The install instructions say to open a new window
in step 4, so it is not repeated too much.

But in any case, we always like to see the full
system check output to know the details. Please
send that to afni.bootcamp whenever you want us
to evaluate it.


  • rick

I got the error you did, and tried running through XQuartz as well and it didn’t seem to make much of a difference.

It seems like my PATH is wrong, but what should I set it to? It seems like AFNI was supposed to update it (according to the installation instructions), but it doesn’t seem to be working.

After installing XQuartz, it seems necessary to
either logout or maybe even reboot to make
XQuartz start X11 automatically.

It would be helpful if you displayed your exact
command and error though, so we can be more
sure of what trouble you may be having.

You might also post the output from: -check_all
  • rick

Continuing on with this same topic, I also had the same problem installing AFNI in my MacOS 10.9 and I also think its a path problem not being updated cuz when I tried Rick’s command ~/abin/ -check_all it worked and also trying to open AFNI, if I type just afni it won’t work. But if I try ~/abin/afni it works!
So how do I update the path to what its supposed to be?


Hi Mary,

Are you still having trouble with this? If so, please
feel free to to send me direct email with the output
from that “~/abin/ -check_all”

I think you can click on my name for the email address.

  • rick