[R-SIG-Mac] /bin/sh: tar: command not found
[Ricardo Rodriguez] Your XEN ICT Team
webmaster at xen.net
Sat Oct 4 00:55:46 CEST 2008
Thanks Kasper,
Kasper Daniel Hansen wrote:
> You can print and set environment variables from within R by doing
>
> Sys.getenv("PATH")
> Sys.setenv(PATH = "SOMETHING")
>
> When you start R from the command line it should inherit the PATH
> (although that depends on how you set it - and note that it looks as
> if you are using SH and not say BASH).
>
It is a bit weird to receive a message concerning sh. As far as I know,
I am using BASH. In fact, I have recently modified /etc/bashrc to
include some Maven variables. I now reads...
*****
sh-3.2# cat bashrc
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
# Maven Settings
export M2_HOME=/usr/local/apache-maven/apache-maven-2.1.0-M1
export M2=$M2_HOME/bin
export PATH=$PATH:$M2
export MAVEN_OPTS=-Xmx600m
sh-3.2#
*****
sh-3.2# echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/apache-maven/apache-maven-2.1.0-M1/bin
*****
From R Console:
*****
> Sys.getenv("PATH")
PATH
"$M2:$PATH:/usr/local/bin"
>
*****
From your comments, I've done...
> Sys.setenv(PATH = "$M2:$PATH:/usr/bin:/usr/local/bin")
And now the installation works smoothly...
*****
> install.packages("zoo",repos="http://R-Forge.R-project.org")
trying URL
'http://R-Forge.R-project.org/bin/macosx/universal/contrib/2.7/zoo_1.6-0.tgz'
Content type 'application/x-gzip' length 651045 bytes (635 Kb)
opened URL
==================================================
downloaded 635 Kb
The downloaded packages are in
/var/folders/6h/6hyderV4GAmSiGLPDwB16k+++TI/-Tmp-//Rtmp8eeprZ/downloaded_packages
> require(zoo)
Loading required package: zoo
*****
So, I think the question could be, is R correctly inheriting PATH? It
seems that it is not able to understand the syntax $M2:$PATH:/usr/local/bin
> Since you are installing a binary from Bioconductor under something I
> guess is the CRAN binary (I cannot be 100% with the info you are
> providing), it really should work. You should not need to have the
> DevTools installed.
I required DevTools for several buildings here not related with R.
Thanks for your help!
Ricardo
--
Ricardo Rodríguez
Your XEN ICT Team
More information about the R-SIG-Mac
mailing list