Installation problems

687 views
Skip to first unread message

Jacob Berv

unread,
Jul 30, 2014, 2:50:31 PM7/30/14
to bioge...@googlegroups.com

Hi there,

I’m trying to get started with BioGeoBears and I can’t get R to install it - here’s the output I get when I try to start your tutorial. Any advice would be appreciated. Should I install an older version of R? I’m currently running the snow leopard version of 3.1.1, but my OS is Mavericks 10.9. I also tried installing from the source but got a ton of errors. 

Logs below: 


R version 3.1.1 (2014-07-10) -- "Sock it to Me"

Copyright (C) 2014 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin10.8.0 (64-bit)


R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.


 Natural language support but running in an English locale


R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.


Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.


[R.app GUI 1.65 (6784) x86_64-apple-darwin10.8.0]


[Workspace restored from /Users/cotinga/.RData]

[History restored from /Users/cotinga/.Rapp.history]


# Install optimx

install.packages("optimx", dependencies=TRUE, repos="http://cran.rstudio.com")

trying URL 'http://cran.rstudio.com/bin/macosx/contrib/3.1/optimx_2014.5.4.tgz'

Content type 'application/x-gzip' length 66552 bytes (64 Kb)

opened URL

==================================================

downloaded 64 Kb



The downloaded binary packages are in

/var/folders/n6/sndqyc7x3lx92xdv5sn6j9dh0000gn/T//RtmpazxFpf/downloaded_packages


# Install BioGeoBEARS from CRAN 0-cloud:

install.packages("BioGeoBEARS", dependencies=TRUE, repos="http://cran.rstudio.com")


  package ‘BioGeoBEARS’ is available as a source package but not as a binary


Warning message:

package ‘BioGeoBEARS’ is not available (for R version 3.1.1)





R version 3.1.1 (2014-07-10) -- "Sock it to Me"

Copyright (C) 2014 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin10.8.0 (64-bit)


R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.


  Natural language support but running in an English locale


R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.


Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.


[R.app GUI 1.65 (6784) x86_64-apple-darwin10.8.0]


[Workspace restored from /Users/cotinga/.RData]

[History restored from /Users/cotinga/.Rapp.history]


> # Install optimx

> install.packages("optimx", dependencies=TRUE, repos="http://cran.rstudio.com")

trying URL 'http://cran.rstudio.com/bin/macosx/contrib/3.1/optimx_2014.5.4.tgz'

Content type 'application/x-gzip' length 66552 bytes (64 Kb)

opened URL

==================================================

downloaded 64 Kb



The downloaded binary packages are in

/var/folders/n6/sndqyc7x3lx92xdv5sn6j9dh0000gn/T//RtmpazxFpf/downloaded_packages

> # Install BioGeoBEARS from CRAN 0-cloud:

> install.packages("BioGeoBEARS", dependencies=TRUE, repos="http://cran.rstudio.com")


   package ‘BioGeoBEARS’ is available as a source package but not as a binary


Warning message:

package ‘BioGeoBEARS’ is not available (for R version 3.1.1) 

> install.packages("cladoRcpp", dependencies=TRUE, repos="http://cran.rstudio.com", type="source")

also installing the dependency ‘RcppArmadillo’


trying URL 'http://cran.rstudio.com/src/contrib/RcppArmadillo_0.4.320.0.tar.gz'

Content type 'application/x-gzip' length 910017 bytes (888 Kb)

opened URL

==================================================

downloaded 888 Kb


trying URL 'http://cran.rstudio.com/src/contrib/cladoRcpp_0.14.4.tar.gz'

Content type 'application/x-gzip' length 59369 bytes (57 Kb)

opened URL

==================================================

downloaded 57 Kb


* installing *source* package ‘RcppArmadillo’ ...

** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked

* checking LAPACK_LIBS: divide-and-conquer complex SVD available via R-supplied LAPACK

** libs

clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include"  -I../inst/include -fPIC  -mtune=core2 -g -O2  -c RcppArmadillo.cpp -o RcppArmadillo.o

clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include"  -I../inst/include -fPIC  -mtune=core2 -g -O2  -c RcppExports.cpp -o RcppExports.o

clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include"  -I../inst/include -fPIC  -mtune=core2 -g -O2  -c fastLm.cpp -o fastLm.o

clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64 -L/usr/local/lib/x86_64 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -lgfortran -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64'

ld: warning: directory not found for option '-L/usr/local/lib/x86_64'

ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3'

ld: library not found for -lgfortran

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [RcppArmadillo.so] Error 1

ERROR: compilation failed for package ‘RcppArmadillo’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo’

ERROR: dependency ‘RcppArmadillo’ is not available for package ‘cladoRcpp’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/cladoRcpp’


The downloaded source packages are in

‘/private/var/folders/n6/sndqyc7x3lx92xdv5sn6j9dh0000gn/T/RtmpazxFpf/downloaded_packages’

Warning messages:

1: In install.packages("cladoRcpp", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘RcppArmadillo’ had non-zero exit status

2: In install.packages("cladoRcpp", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘cladoRcpp’ had non-zero exit status

> install.packages("BioGeoBEARS", dependencies=TRUE, repos="http://cran.rstudio.com", type="source")

also installing the dependencies ‘SparseM’, ‘RcppArmadillo’, ‘rexpokit’, ‘cladoRcpp’, ‘FD’


trying URL 'http://cran.rstudio.com/src/contrib/SparseM_1.05.tar.gz'

Content type 'application/x-gzip' length 597962 bytes (583 Kb)

opened URL

==================================================

downloaded 583 Kb


trying URL 'http://cran.rstudio.com/src/contrib/RcppArmadillo_0.4.320.0.tar.gz'

Content type 'application/x-gzip' length 910017 bytes (888 Kb)

opened URL

==================================================

downloaded 888 Kb


trying URL 'http://cran.rstudio.com/src/contrib/rexpokit_0.24.1.tar.gz'

Content type 'application/x-gzip' length 73790 bytes (72 Kb)

opened URL

==================================================

downloaded 72 Kb


trying URL 'http://cran.rstudio.com/src/contrib/cladoRcpp_0.14.4.tar.gz'

Content type 'application/x-gzip' length 59369 bytes (57 Kb)

opened URL

==================================================

downloaded 57 Kb


trying URL 'http://cran.rstudio.com/src/contrib/FD_1.0-11.tar.gz'

Content type 'application/x-gzip' length 42827 bytes (41 Kb)

opened URL

==================================================

downloaded 41 Kb


trying URL 'http://cran.rstudio.com/src/contrib/BioGeoBEARS_0.2.1.tar.gz'

Content type 'application/x-gzip' length 453603 bytes (442 Kb)

opened URL

==================================================

downloaded 442 Kb


* installing *source* package ‘SparseM’ ...

** package ‘SparseM’ successfully unpacked and MD5 sums checked

** libs

gfortran-4.2 -arch x86_64   -fPIC  -g -O2  -c bckslv.f -o bckslv.o

make: gfortran-4.2: No such file or directory

make: *** [bckslv.o] Error 1

ERROR: compilation failed for package ‘SparseM’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/SparseM’

* installing *source* package ‘RcppArmadillo’ ...

** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked

* checking LAPACK_LIBS: divide-and-conquer complex SVD available via R-supplied LAPACK

** libs

clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include"  -I../inst/include -fPIC  -mtune=core2 -g -O2  -c RcppArmadillo.cpp -o RcppArmadillo.o

clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include"  -I../inst/include -fPIC  -mtune=core2 -g -O2  -c RcppExports.cpp -o RcppExports.o

clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include"  -I../inst/include -fPIC  -mtune=core2 -g -O2  -c fastLm.cpp -o fastLm.o

clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64 -L/usr/local/lib/x86_64 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -lgfortran -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64'

ld: warning: directory not found for option '-L/usr/local/lib/x86_64'

ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3'

ld: library not found for -lgfortran

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [RcppArmadillo.so] Error 1

ERROR: compilation failed for package ‘RcppArmadillo’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo’

* installing *source* package ‘FD’ ...

** libs

clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c gowdis.c -o gowdis.o

gfortran-4.2 -arch x86_64   -fPIC  -g -O2  -c itscale5.f -o itscale5.o

make: gfortran-4.2: No such file or directory

make: *** [itscale5.o] Error 1

ERROR: compilation failed for package ‘FD’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/FD’

ERROR: dependency ‘SparseM’ is not available for package ‘rexpokit’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rexpokit’

ERROR: dependency ‘RcppArmadillo’ is not available for package ‘cladoRcpp’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/cladoRcpp’

ERROR: dependencies ‘rexpokit’, ‘cladoRcpp’, ‘FD’ are not available for package ‘BioGeoBEARS’

* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/BioGeoBEARS’


The downloaded source packages are in

‘/private/var/folders/n6/sndqyc7x3lx92xdv5sn6j9dh0000gn/T/RtmpazxFpf/downloaded_packages’

Warning messages:

1: In install.packages("BioGeoBEARS", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘SparseM’ had non-zero exit status

2: In install.packages("BioGeoBEARS", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘RcppArmadillo’ had non-zero exit status

3: In install.packages("BioGeoBEARS", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘FD’ had non-zero exit status

4: In install.packages("BioGeoBEARS", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘rexpokit’ had non-zero exit status

5: In install.packages("BioGeoBEARS", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘cladoRcpp’ had non-zero exit status

6: In install.packages("BioGeoBEARS", dependencies = TRUE, repos = "http://cran.rstudio.com",  :

  installation of package ‘BioGeoBEARS’ had non-zero exit status

Nick Matzke

unread,
Jul 30, 2014, 3:04:51 PM7/30/14
to bioge...@googlegroups.com
Hi!

As you can see from digging into the error message, BioGeoBEARS depends on package cladoRcpp, and cladoRcpp depends on RcppArmadillo. RcppArmadillo is what is failing on your machine.

RcppArmadillo is a a package done by the Rcpp people and is outside of my control.  So, general advice on installing packages:

1. Try using the R.app GUI, menu: Packages & Data --> Package Installer

...search for the package causing problems (RcppArmadillo) and various ways of installing it. The easiest install should be "binary".

CRAN automatically generates binaries (which are pre-compiled) for most packages, but usually only for current-ish versions of R and current-ish operating systems.

Installing from source is available when binaries are not. Installing from source will be easy if it's a pure-R package. However, if the package has C++, FORTRAN code, etc., you will need your own compilers: gcc, gfortran, etc.  Getting this is do-able but its its own project.

(Examples of pure-R package: BioGeoBEARS

NOT pure-R: e.g. rexpokit, cladoRcpp, Rcpp, RcppArmadillo)


2. Almost certain binaries are or will be available for RcppArmadillo, but perhaps your combination of R version, OS etc. this hasn't happened yet. You can monitor CRAN's progress on making binaries at the package's CRAN page:



3. So, general advice: focus on getting each dependency installed & library-ed in R, then once that's done, go back and try BioGeoBEARS again.

Cheers,
Nick




--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
To post to this group, send email to bioge...@googlegroups.com.
Visit this group at http://groups.google.com/group/biogeobears.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeobears/e6fc8e82-eca7-4ce8-ac47-f905923512a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacob Berv

unread,
Jul 30, 2014, 3:44:25 PM7/30/14
to bioge...@googlegroups.com
Tried installing RcppArmadillo through the package installer and was successful. But I’m still only able to see BioGeoBears as a CRAN source, not as a binary. 

I have a gcc compiler from Xcode, and I have gfortran also installed, but still get errors when trying to install from the source. 



R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin10.8.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[R.app GUI 1.65 (6784) x86_64-apple-darwin10.8.0]

[Workspace restored from /Users/cotinga/.RData]
[History restored from /Users/cotinga/.Rapp.history]

Content type 'application/x-gzip' length 1060751 bytes (1.0 Mb)
opened URL
==================================================
downloaded 1.0 Mb


The downloaded binary packages are in
/var/folders/n6/sndqyc7x3lx92xdv5sn6j9dh0000gn/T//Rtmpg4XyLE/downloaded_packages
also installing the dependencies ‘SparseM’, ‘rexpokit’, ‘FD’

Content type 'application/x-gzip' length 597962 bytes (583 Kb)
opened URL
==================================================
downloaded 583 Kb

Content type 'application/x-gzip' length 73790 bytes (72 Kb)
opened URL
==================================================
downloaded 72 Kb

Content type 'application/x-gzip' length 42827 bytes (41 Kb)
opened URL
==================================================
downloaded 41 Kb

Content type 'application/x-gzip' length 453603 bytes (442 Kb)
opened URL
==================================================
downloaded 442 Kb

* installing *source* package ‘SparseM’ ...
** package ‘SparseM’ successfully unpacked and MD5 sums checked
** libs
gfortran-4.2 -arch x86_64   -fPIC  -g -O2  -c bckslv.f -o bckslv.o
make: gfortran-4.2: No such file or directory
make: *** [bckslv.o] Error 1
ERROR: compilation failed for package ‘SparseM’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/SparseM’
* installing *source* package ‘FD’ ...
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c gowdis.c -o gowdis.o
gfortran-4.2 -arch x86_64   -fPIC  -g -O2  -c itscale5.f -o itscale5.o
make: gfortran-4.2: No such file or directory
make: *** [itscale5.o] Error 1
ERROR: compilation failed for package ‘FD’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/FD’
ERROR: dependency ‘SparseM’ is not available for package ‘rexpokit’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rexpokit’
ERROR: dependencies ‘rexpokit’, ‘FD’ are not available for package ‘BioGeoBEARS’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/BioGeoBEARS’

The downloaded source packages are in
‘/private/var/folders/n6/sndqyc7x3lx92xdv5sn6j9dh0000gn/T/Rtmpg4XyLE/downloaded_packages’





You received this message because you are subscribed to a topic in the Google Groups "BioGeoBEARS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/biogeobears/ZaIrrbwE0gQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to biogeobears...@googlegroups.com.

To post to this group, send email to bioge...@googlegroups.com.
Visit this group at http://groups.google.com/group/biogeobears.

Nick Matzke

unread,
Jul 30, 2014, 4:03:12 PM7/30/14
to bioge...@googlegroups.com
As you can see in the message, it's now hitting a block installing the SparseM package. This is another one for which a binary should be available, so try getting it as with the other packages.

In the cases where you are installing things from source and its failing, it looks like the problem is that the compiler can't find gfortran.  There are ways to give compilers flags giving the location of things like gfortran and its libraries, but it is probably easiest to go to:

Terminal window:

cd /usr/bin

cd /usr/local/include

...and see what exists in there in terms of gfortran executables and libraries. Often you can use a symbolic link (ln -s) to make the actual gfortran files appear in those directories, where the compiler should see them.


Yet another option is to edit your .bash_profile file, in your user directory:

cd ~
pwd
more .bash_profile
open .bash_profile

...and edit $PATH to include the location of gfortran.

Most people don't have all these problems so I wonder if you got some R setting that is always trying to install all R packages from source.  


General advice:

Read the error messages, and work on getting each dependency package installed one-by-one. Once you have them all, THEN try BioGeoBEARS again.

Cheers,
Nick







Reply all
Reply to author
Forward
0 new messages