Thanks for your patience!
Post by Kasper Daniel HansenOk, I think I know what went wrong now
The key information was that you are using R.app (the GUI) which was
not clear to me until now.
:-( Ok, I was calling console to the graphical console... R 2.7.2 GUI
1.25 (5217) :-( again. Sorry about this.
Post by Kasper Daniel HansenFirst I would say however that you seem to be messing around a bit. In
your previous email you said you had modified .bashrc to include the
long PATH setting, but in your grep below, bashrc is not mentioned. So
I assume you have deleted it in the meantime?
I've modified the system wied .bashrc in /etc. Note that I've do cd, not
cd / previous to grep. Look now...
GMXUX-Ricardo-Rodriguez:etc rrodriguez$ sudo grep PATH * .*
Password:
bashrc:export PATH=$M2:$PATH
locate.rc:#SEARCHPATHS="/"
locate.rc:#PRUNEPATHS="/tmp /var/tmp"
locate.rc:# and if the SEARCHPATHS starts in such a filesystem locate
will build
man.conf:# when MANPATH contains an empty substring), to find out where
the cat
man.conf:# and to map each PATH element to a manpath element.
man.conf:# MANPATH manpath_element [corresponding_catdir]
man.conf:# MANPATH_MAP path_element manpath_element
man.conf:# Every automatically generated MANPATH includes these fields
man.conf:MANPATH /usr/share/man
man.conf:MANPATH /usr/local/share/man
man.conf:MANPATH /usr/X11/man
man.conf:# MANPATH /opt/*/man
man.conf:# MANPATH /usr/lib/*/man
man.conf:# MANPATH /usr/share/*/man
man.conf:# MANPATH /usr/kerberos/man
man.conf:# Set up PATH to MANPATH mapping
man.conf:# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
man.conf:MANPATH_MAP /bin /usr/share/man
man.conf:MANPATH_MAP /sbin /usr/share/man
man.conf:MANPATH_MAP /usr/bin /usr/share/man
man.conf:MANPATH_MAP /usr/sbin /usr/share/man
man.conf:MANPATH_MAP /usr/local/bin /usr/local/share/man
man.conf:MANPATH_MAP /usr/local/sbin /usr/local/share/man
man.conf:MANPATH_MAP /usr/X11/bin /usr/X11/man
man.conf:MANPATH_MAP /usr/bin/X11 /usr/X11/man
man.conf:MANPATH_MAP /usr/bin/mh /usr/share/man
man.conf:# NOAUTOPATH keeps man from automatically adding directories
that look like
man.conf:#NOAUTOPATH
php.ini.default:safe_mode_protected_env_vars = LD_LIBRARY_PATH
php.ini.default:; cgi.fix_pathinfo provides *real*
PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
php.ini.default:; previous behaviour was to set PATH_TRANSLATED to
SCRIPT_FILENAME, and to not grok
php.ini.default:; what PATH_INFO is. For more information on PATH_INFO,
see the cgi specs. Setting
php.ini.default:; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
rc.common:PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices;
export PATH
sshd_config:# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
GMXUX-Ricardo-Rodriguez:etc rrodriguez$
bashrc has been modified. This also answer question 2) below.
Post by Kasper Daniel HansenAnyways, you seem to have been playing around a bit with your
environment variables and how to set them. In general graphical
applications on OS X does not care about what you do in your .bashrc
or .bash_profile, period. But you have still managed to kind of screw
things up :). And whatever you do in your .bashrc or .bash_profile
won't have any effect on R.app because it does not care about these
files (so you may answer, how come that # open -a R.app ... worked?
Well, that is because you launched R from inside Terminal, and in that
case it inherits stuff from Terminal).
So what are the options for what you could have done
1) You have created an environment.plist variable inside inside
http://developer.apple.com/qa/qa2001/qa1067.html
In order to check for this you could do something like
# find ~/ -iname "environment.plist"
(this will take a while)
I've done it. I hasn't effect on the PATH. I forgot to delete it. I
deleted it now.
GMXUX-Ricardo-Rodriguez:.MacOSX rrodriguez$ cat environment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>M2</key>
<string>/usr/local/apache-maven/apache-maven-2.0.9/bin</string>
<key>M2_HOME</key>
<string>/usr/local/apache-maven/apache-maven-2.0.9</string>
<key>MAVEN_OPTS</key>
<string>-Xms256m -Xmx512m</string>
<key>PATH</key>
<string>$M2:$PATH</string>
</dict>
</plist>
GMXUX-Ricardo-Rodriguez:.MacOSX rrodriguez$
Post by Kasper Daniel Hansen2) You have messed with your system wide settings in /etc. You could
look for the M2 problem you have by doing
# cd /etc
Yes, I've done this as well. This was the .bashrc I was speaking about
in my previous messages.
Post by Kasper Daniel Hansen3) You have played with the R installation (unlikely)
Fortunately I've had no time to screw up my R installation.
Post by Kasper Daniel HansenIf you are truly desperate, you could execute the grep command from /,
but that will take ages.
So once you have located it, what is your fix?
0) delete or restore the file you located above
1) keep everything in .profile instead of .bashrc and .bash_profile
2) You may have to log out and log in again.
3) If you really want to use your apache-maven PATH in R, do the
following: create a file called ~/.Rprofile and put the following in it
Sys.putenv(PATH=SOMETHING)
Thats is probably the best long term solution.
I don't to use the apache-maven PATH in R. This problem arises when
trying to install a packages and R was not able to find tar.
Now that I have:
1. deleted ~/.MacOSX/environment.plist
2. restored the original /etc/bashrc script
3. created a ~/.profile script with the following content that allow me
to have access to the Maven release I do need:
# Maven Settings
export M2_HOME=/usr/local/apache-maven/apache-maven-2.1.0-M1
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export MAVEN_OPTS=-Xmx600m
In spite of this, I keep getting this in R:
*****
PATH
"$M2:$PATH:/usr/local/bin"
*****
If I launch R from a terminal all runs smoothly.
The ~/.Rprofile didn't work. Here the content of the ~/.Rprofile file:
Sys.putenv(PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/bin)
I am running sudo grep $M2:$PATH: -R * .* in the root directory now. I
will keep this thread posted. I am not able to figure out where is the
problem. Thank you so much for your help.
Best,
Ricardo
--
Ricardo Rodríguez
Your XEN ICT Team