Hi All,
I tried to install Hmisc from source, but I had errors due to
permission issues (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 ---
Loading Tcl/Tk interface ... Error in fun(...) : no display name and
no $DISPLAY environment variable
Error: .onLoad failed in 'loadNamespace' for 'tcltk'
The same command in Debian Linux opens a tcl/tk widget... How can I
install stuff from the terminal? 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). BTW, I installed all the .dmg packages that
were bundled with R.app.
Cheers,
Federico
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax +44 (0)20 75943193
f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com
problem installing packages from terminal
5 messages · Federico Calboli, Simon Urbanek, stefano iacus
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
Hi Simon, Thanks for the very comprehensive explanation... I am new to OSX and to a number of things done the R.app way.
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.
I am a Linux user at work (and I sysadmin for myself as well), and the more Linux/Unix like in behaviour I can make OSX the better. The fact that I have administrative privileges is something I find pretty weird. Cheers, Federico
Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
On 04/giu/05, at 20:18, Federico Calboli wrote:
Hi All, I tried to install Hmisc from source, but I had errors due to permission issues (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 --- Loading Tcl/Tk interface ... Error in fun(...) : no display name and no $DISPLAY environment variable Error: .onLoad failed in 'loadNamespace' for 'tcltk'
the binaries of R for Mac OS X assumes X11 tcltk. You need to start the X11 server and either set the DISPLAY var to :0 if you use R from the command line. R.app sets the DISPLAY var for you. Unless you build an aqua version of the tcltk R package (i.e. you configure R to use Aqua TclTk headers) you always need to have a X11 window server running (like on Linux, I would say). stefano
The same command in Debian Linux opens a tcl/tk widget... How can I install stuff from the terminal? 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). BTW, I installed all the .dmg packages that were bundled with R.app. Cheers, Federico Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
On Jun 4, 2005, at 3:32 PM, Federico Calboli wrote:
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.
I am a Linux user at work (and I sysadmin for myself as well), and the more Linux/Unix like in behaviour I can make OSX the better. The fact that I have administrative privileges is something I find pretty weird.
What do you mean? This may be just a terminology issue. On OS X "administrators" (i.e. users with administrative privileges - or as System Preferences call it "users that are allowed to administer this computer") are users that can sudo to get root privileges. They are also members of the "admin" group. Other than that, they are ordinary users, so if you login as one, you (and any program you run) can do as little harm as any other regular user. Only if you sudo (either on the command line or using Security framework) you get the effective permissions of a root. As with any system, you should think twice before giving someone admin access ;). The advantage of this security concept (which you can use on any unix system) as opposed to actually logging in as root is that you run only very specific tasks with root privileges, thus reducing the possibility of damaging the system. This is why root is disabled by default on OS X - to make it more secure. Another nice security aspect is that SF authentication changes only euid, therefore it is still possible to trace which user is actually using the root privileges. BTW: A side note on the original topic: if you install a package manually as root, it will change its permissions inside the framework, so you won't be able to update it as admin user anymore - you'll always have to do it as root from that point on. Another reason to not do that ;). Cheers, Simon