[R-SIG-Mac] problem installing packages from terminal

Simon Urbanek simon.urbanek at r-project.org
Sat Jun 4 21:11:04 CEST 2005


Hi Federico,

On Jun 4, 2005, at 2:18 PM, Federico Calboli wrote:

> I tried to install Hmisc from source, but I had errors due to  
> permission issues

Are you sure? Please look at the output more closely.  Hmisc usually  
fails due to compiler problems, not permission issues. If you are  
using R binary from CRAN, you don't need to use root for  
installation, any user with admin privileges will do. The last  
warning about permissions on .css can be safely discarded and has  
nothing to do with the success/failure of a package installation.

Furthermore R.app checks permissions before installation, so it would  
ask for authorization if there were any permission issues.

Finally, you can use R.app to install as root as well - if you want  
to force installation as root, click on the "lock" icon in the tool  
bar, the installation will then be performed as root (but usually  
this is not necessary, see above).

> (I enabled root form my box). I tried to install from the terminal  
> after su-ing to root, but I get the following:
>
> > install.packages("locfit")
> --- Please select a CRAN mirror for use in this session ---

You didn't select CRAN mirror. You should either set it globally or  
supply the url to install.packages. Also note that the default on  
CRAN OS X is binary installation, so what you probably want is rather  
install.packages("Hmisc",repos="http://cran.us.r- 
project.org/",type="source") - of course replace with your mirror of  
choice.

> I'd rather not log out and log in again as root to install stuff  
> that needs g77... (I did for Hmisc, and worked like a charm).

You don't need to - in fact it's not recommended to enable the root  
user on OS X and it's completely unnecessary, because you should be  
using sudo with the same effect without potentially hazardous side- 
effects of enabling root.

Cheers,
Simon



More information about the R-SIG-Mac mailing list