Philipp,
> installation of package ‘afex’ had non-zero exit status
It seems that the main failure is about the installation of the R package "afex", which would only impact on the AFNI program 3dMVM. So, you can proceed to use all other AFNI programs except 3dMVM.
As for the issue with 'afex', you may try the following command inside R:
install.packages('quantreg')
and track down the problem.
Gang