On 11/4/13, 3:56 PM, Nathan Lemoine wrote:
> Hi,
>
> This might seem like a simple question, but I'm having trouble installing STAN and RStan on my Mac.
Just a heads up: you don't need command-line Stan in order to run RStan.
You'll need to give us a little more info before
we can help you debug. Which version of Mac OS are
you using and which version of g++ and make (you can type
"g++ -v" and "make -v" in a shell for the latter)?
> For STAN, I followed the directions in the reference manual. I downloaded the source code,
From a GitHub branch or one of our stable distributions? If
the latter, which one? If the former, when?
> unpacked it to a folder in my
> Applications directory. I've verified that I have the neccessary versions of make and g++. When I navigate to my stan
> folder,
You should be able to run "ls" and see the top-level makefile
and src directory if you're in the right location.
I run
>
> make bin/libstan.a
>
> and I get the error:
>
> make/tests:169: *** multiple target patterns. Stop.
>
> I've tried looking this up, but I couldn't find anything.
Basically, all the online info I found just repeats the message.
Have you perhaps modified the makefile? I'd try downloading
it again or unpacking from the tarball you have depending on
how you downloaded it. You shouldn't get this problem if you
don't have a corrupted makefile.
> Second, when I try to install RStan, I followed the directions on the website. I installed Rcpp and inline packages. I
> verified that I have a C++ compiler (the 'hello world' code worked). But when I try to install RStan, I get the error
>
> ERROR: failed to lock directory �/Users/Nate/Library/R/3.0/library� for modifying
> Try removing �/Users/Nate/Library/R/3.0/library/00LOCK-rstan�
I'm not an R expert, but can you search for a file 00LOCK-rstan using
Spotlight and see if you have one anywhere? I don't know what R uses
them for, but files with "LOCK" in the name are typically used for
old-school process-level synchronization. If something dies in the middle
without cleaning up the lock, you basically have problems because you
can't start a process again if there's already a lock file that it's
expecting to create in place.
> There is no folder called 00LOCK-rstan in my directory and if I run
>
> remove.packages('rstan')
>
> I get an error that there is no package called rstan installed.
Right -- you bombed out in the middel of the install. You may need
to find where it partially installed and just clean everything out.
R users tend to just reinstall R from scratch when something like
this goes wrong! But you can probably affect a subtler fix by just
cleaning out the litter from the failed install and trying again.
Make sure you follow the instructions to shut down and restart R
in between installs.
> What am I doing wrong?
Hard to know without more info. I wish we could make this process
easier for users, but R is super stateful, and it can get itself
into a knot like you've found that you can't get out of from within
R itself.
- Bob