[R-SIG-Mac]still struggling

Don MacQueen macq@llnl.gov
Thu, 17 Oct 2002 11:16:35 -0700


Learning unix, and at the same time installing the Darwin version of 
R and doing the necessary customization of your unix environment, is 
a very challenging task. Don't be surprised you're having a hard 
time, anyone would. There are a lot of different pieces to the 
puzzle, and they all have to come together the right way.

At 7:11 PM +0200 10/17/02, Jean-Pierre Gattuso wrote:
>Hi:
>
>I still have problems to install R 1.6. I have tried both ways.
>
>
>1- With Fink:
>
>I deleted the whole /sw directory, installed fink again and 
>installed r-base. The following error prevents installation:
>
>	checking for /sw/lib/tkConfig.sh... /sw/lib/tkConfig.sh
>	./configure: /sw/lib/tclConfig.sh: No such file or directory
>	make: *** No targets specified and no makefile found.  Stop.
>	### execution of (export failed, exit code 2
>	Failed: compiling r-base-1.6.0-1 failed
>

Do
   fink install tcltk tcltk-dev tcltk-shlibs
and then try r-base again.

Actually, there are several other things from fink that R needs; Jan 
outlined the list of them recently on R-sig-mac. Here is my list--I 
am pretty sure it is complete

  i      atlas   3.4.1-1 Portably optimal linear algebra software.
  i      bzip2   1.0.2-1 Block-sorting file compressor
  i      dlcompat        20020929-1      Dynamic loading compatibility library
  i      gzip    1.2.4a-6        The gzip file compressor
  i      libjpeg 6b-5    JPEG image format handling library
  i      libjpeg-bin     6b-5    JPEG image format handling library
  i      libjpeg-shlibs  6b-5    JPEG image format handling library
  i      libpng  1.0.12-6        PNG image format handling library
  i      libpng-shlibs   1.0.12-6        PNG image format handling library
  i      ncurses 5.2-8   Full-screen ascii drawing library
  i      pcre    3.9-2   Perl Compatible Regular Expressions Library
  i      pcre-bin        3.9-2   Perl Compatible Regular Expressions Library
  i      pcre-shlibs     3.9-2   Perl Compatible Regular Expressions Library
  i      readline        4.3-5   Comfortable terminal input library
  i      readline-shlibs 4.3-5   Comfortable terminal input library
  i      tcltk   8.3.4-1 Tool Command Language and the Tk toolkit.
  i      tcltk-dev       8.3.4-1 Tool Command Language and the Tk toolkit.
  i      tcltk-shlibs    8.3.4-1 Tool Command Language and the Tk toolkit.

Atlas is optional, I'm pretty sure, and has some extra complications 
of its own, so I'd skip it for now. It also takes a very long time.

If you were installing R from source code, you would also need g77 from fink

  i      g77     3.1-20020420-2  GNU FORTRAN77 compiler.


If your OS X is 10.1.x, then you also need "libz" from fink, but not 
if it is OS X 10.2.

My fink list above is for 10.2; the version numbers will be different 
for 10.1.x. There might be slight name variations in the fink for 
10.1, for example, it might be "bzip" instead of "bzip2". I don't 
know that for sure, but I mention it as an example of the kind of 
thing to watch out for.

>
>2- Using Jan's instructions:
>
>	http://gifi.stat.ucla.edu/pub/R-1.6.0.tar.gz
>	unpack the R distribution in /usr/local/lib
>	sudo ln -s /usr/local/lib/R/bin/R /usr/local/bin/R
>
>Here I had the following error: ln: /usr/local/bin/R: No such file 
>or directory
>
>I then creatde the missing directories and the ln command went 
>apparently fine. However I cannot launch R and get a "command not 
>found error".

Exactly what did you type when you tried to launch R?
What directory were you in when you did it?  (type "pwd" if you're unsure)
(copying a few lines from your screen and pasting them into your 
email can be helpful)

Probably, the explanation for this error is that you have not added 
/usr/local/bin to your unix PATH environment variable. To find out, 
try starting R by typing the full path to R:
   /usr/local/bin/R

(note, for R installed by fink the full path to R is different: /sw/bin/R)

If R starts up, you will have verified a successful R installation. 
Your job then will be to learn how to customize, or adjust, you unix 
environment so that you can start R by just typing "R" instead of the 
full path.

To find out what your PATH is, type
   echo $PATH
or
   printenv PATH

You should get a list of locations separated by colons. To add 
/usr/local/bin to your PATH on a one-time basis, type
   setenv PATH ${PATH}:/usr/local/bin
followed by
   rehash

Then try starting R by just typing "R". If it worked using the full 
path, at this point it should work with just the "R".
But this will not persist beyond your current session, nor will it 
take effect in other Terminal windows.

Any time you add a new application to any location in your PATH, you have type
   rehash
to let unix know there is something new there it should be aware of. 
I'm not certain that rehash is needed after a change to PATH, but to 
be safe, do it.

Even using Jan's instructions, you still need some of the things from 
fink in order for R to have full capability. For example, R can save 
graphics in PNG format, but not unless you have installed the png 
things from fink.

>
>Any help would be greatly appreciated. I feel really stupid and find 
>the learning curve of unix pretty steep!

To extend the analogy, not only is it steep, but you are starting not 
at the beginning of the hill, but part-way up.

>
>jp
>
>--
>Jean-Pierre Gattuso | mailto:gattuso@obs-vlfr.fr | 
>http://www.obs-vlfr.fr/~gattuso
>
>_______________________________________________
>R-SIG-Mac mailing list
>R-SIG-Mac@stat.math.ethz.ch
>http://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
--------------------------------------