[R-SIG-Mac] Problems to install a package

José Carlos Guerrero Antúnez jcgantunez at gmail.com
Wed Jul 29 15:59:39 CEST 2015


Hi,

My machine is a IMac (21.5-inch, Late 2009), the package is at
http://r-forge.r-project.org/R/?group_id=2103,

If I use RStudio according the instructions of the project RMacoqui, I got
this message,

> install.packages("RMacoqui", repos="http://R-Forge.R-project.org")
Installing package into ‘/Users/joseca_IMac/Library/R/3.2/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository
http://R-Forge.R-project.org/bin/macosx/mavericks/contrib/3.2
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘RMacoqui’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘RMacoqui’

trying URL 'http://R-Forge.R-project.org/src/contrib/RMacoqui_1.0.tar.gz'
Content type 'application/x-gzip' length 43410 bytes (42 KB)
==================================================
downloaded 42 KB

ERROR: failed to lock directory ‘/Users/joseca_IMac/Library/R/3.2/library’
for modifying
Try removing ‘/Users/joseca_IMac/Library/R/3.2/library/00LOCK-RMacoqui’
Warning in install.packages :
  installation of package ‘RMacoqui’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/kn/2zfqx7n545xfx1vwb5gq9gfr0000gn/T/Rtmpjyj1Tt/downloaded_packages’


Many thanks,



José Carlos Guerrero


2015-07-28 18:37 GMT-03:00 Simon Urbanek <simon.urbanek at r-project.org>:

> Jose,
>
> I suspect you're using a rather old Mac that is no longer supported by our
> tools.
>
> The only other alternative I can think of is that you may have better luck
> trying to use the older Fortran compiler from CRAN at
> https://cran.r-project.org/bin/macosx/tools/gfortran-4.2.3.pkg
>
> In order to avoid clashes with the newer compiler, you may need to run (on
> the command line) something like
>
> sudo ln -sfn gfortran /usr/local/bin/gfortran-4.8
>
> I'm not sure if it will work, but that's the best guess short of
> installing the Homebrew toolchain and re-compiling R which is a bit of an
> overkill.
>
> Cheers,
> Simon
>
>
> > On Jul 28, 2015, at 3:13 PM, José Carlos Guerrero Antúnez <
> jcgantunez at gmail.com> wrote:
> >
> > Hi,
> >
> > First, thank you for your answers, and I have to admit that don't prepare
> > to do a bit more work, because I'm a user that I have no programming
> > skills, and therefore, I depend on people like you, to use these
> programs.
> >
> > According to the easier instruction, and I downloaded
> > gfortran-4.8.2-darwin13.tar.bz2
> >
> > You'll want to unpack it in the root folder at `/` (or move it there
> after
> > unpacking); the directory structure is such that the necessary
> > pieces are dumped into `/usr/local/` and R will by default be able to
> discover
> > everything needed.
> >
> > It will not let me move the item "usr" to the root folder "/"
> >
> > Now I have this error message,
> >
> >> install.packages("~/Desktop/RMacoqui_1.0.tar.gz", repos = NULL, type =
> > "source",
> > lib="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
> > * installing *source* package ‘RMacoqui’ ...
> > ** libs
> > gfortran-4.8   -fPIC  -g -O2  -c RMacoqui.f -o RMacoqui.o
> > gfortran-4.8: warning: couldn’t understand kern.osversion ‘14.4.0
> > f951: internal compiler error: Illegal instruction: 4
> >
> > f951: internal compiler error: Abort trap: 6
> > gfortran-4.8: internal compiler error: Abort trap: 6 (program f951)
> > make: *** [RMacoqui.o] Abort trap: 6
> > ERROR: compilation failed for package ‘RMacoqui’
> > * removing
> > ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/RMacoqui’
> > Warning in install.packages :
> >  installation of package ‘/Users/joseca_IMac/Desktop/RMacoqui_1.0.tar.gz’
> > had non-zero exit status
> >
> > Many thanks again,
> >
> >
> > Best regards,
> >
> >
> >
> >
> > 2015-07-27 23:49 GMT-03:00 Kevin Ushey <kevinushey at gmail.com>:
> >
> >> There error here is, as it says:
> >>
> >>> make: gfortran-4.8: No such file or directory
> >>
> >> In other words, `make` is attempting to call `gfortran-4.8` to compile
> >> FORTRAN code in your package, but is unable to find it -- likely
> >> because it's not installed.
> >>
> >> Since 'gfortran' is no longer distributed as part of Apple's command
> >> line tools, you'll need to install it from another source -- Simon
> >> Urbanek hosts a version of 'gfortran' at http://r.research.att.com/
> >> (more specifically, in the `libs` directory at
> >> http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2).
> >> You'll want to unpack it in the root folder at `/` (or move it there
> >> after unpacking); the directory structure is such that the necessary
> >> pieces are dumped into `/usr/local/` and R will by default be able to
> >> discover everything needed.
> >>
> >> Alternatively (if you're prepared to do a bit more work), you can use
> >> the OS X package manager homebrew to install 'gcc' and hence
> >> 'gfortran'. Install homebrew following the instructions here:
> >>
> >>    http://brew.sh/
> >>
> >> and then, from the command line, call
> >>
> >>    brew install gcc
> >>
> >> This will install an up-to-date version of both 'gcc' and 'gfortran'.
> >> Since it won't be installed into a directory that's 'visible' to R by
> >> default, you'll need to tell R how to find it -- you can check the
> >> StackOverflow questions + responses here for ideas on how to
> >> accomplish that.
> >>
> >>
> >>
> http://stackoverflow.com/questions/29992066/rcpp-warning-directory-not-found-for-option-l-usr-local-cellar-gfortran-4-8
> >>
> >>
> http://stackoverflow.com/questions/19920281/rcpparmadillo-compile-errors-on-os-x-mavericks/19920761#19920761
> >>
> >> As an aside -- I am not sure why make is attempting to call
> >> `gfortran-4.8` rather than `gfortran`. You might have to check
> >> `~/.R/Makevars` or other package configuration variables. (Do you
> >> _really_ need to be compiling with `gfortran-4.8` specifically?)
> >>
> >> Hope this helps,
> >> Kevin
> >>
> >>
> >> On Mon, Jul 27, 2015 at 7:19 PM, David Winsemius <
> dwinsemius at comcast.net>
> >> wrote:
> >>>
> >>> On Jul 27, 2015, at 6:49 PM, José Carlos Guerrero Antúnez wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I have this problem when I try to install a package, I'm working with
> >> OSX
> >>>> Yosemite 10.10.4.
> >>>>
> >>>> Best regards,
> >>>>
> >>>>> install.packages("~/Downloads/RMacoqui_1.0.tar.gz", repos = NULL,
> type
> >> =
> >>>> "source",
> >>>> lib="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
> >>>> * installing *source* package ‘RMacoqui’ ...
> >>>> ** libs
> >>>> gfortran-4.8   -fPIC  -g -O2  -c RMacoqui.f -o RMacoqui.o
> >>>> make: gfortran-4.8: No such file or directory
> >>>
> >>> I suspect that you have not obtained Xcode and installed Command line
> >> tools and perhaps not installed XQuartz (although that is not the cause
> of
> >> any error that I see here.)
> >>>
> >>> Apple has pretty much always made XCode available for free. You need to
> >> register with Apple as a developer and then get the XCode version that
> is
> >> mated to your version of OSX.
> >>>
> >>>
> >>>
> >>> --
> >>> David
> >>>
> >>>> make: *** [RMacoqui.o] Error 1
> >>>> ERROR: compilation failed for package ‘RMacoqui’
> >>>> * removing
> >>>>
> >>
> ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/RMacoqui’
> >>>> Warning in install.packages :
> >>>> installation of package ‘/Users/joseca/Downloads/RMacoqui_1.0.tar.gz’
> >> had
> >>>> non-zero exit status
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> ################################################################
> >>>> Dr. José Carlos Guerrero
> >>>> Laboratorio de Desarrollo Sustentable y Gestión Ambiental del
> Territorio
> >>>> (LDSGAT)
> >>>> Instituto de Ecología y Ciencias Ambientales (IECA)
> >>>> Facultad de Ciencias
> >>>> Universidad de la República
> >>>> Montevideo-URUGUAY
> >>>> ################################################################
> >>>>
> >>>>      [[alternative HTML version deleted]]
> >>>>
> >>>> _______________________________________________
> >>>> R-SIG-Mac mailing list
> >>>> R-SIG-Mac at r-project.org
> >>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >>>
> >>> David Winsemius
> >>> Alameda, CA, USA
> >>>
> >>> _______________________________________________
> >>> R-SIG-Mac mailing list
> >>> R-SIG-Mac at r-project.org
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >>
> >
> >
> >
> > --
> > ################################################################
> > Dr. José Carlos Guerrero
> > Laboratorio de Desarrollo Sustentable y Gestión Ambiental del Territorio
> > (LDSGAT)
> > Instituto de Ecología y Ciencias Ambientales (IECA)
> > Facultad de Ciencias
> > Universidad de la República
> > Montevideo-URUGUAY
> > ################################################################
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>


-- 
################################################################
Dr. José Carlos Guerrero
Laboratorio de Desarrollo Sustentable y Gestión Ambiental del Territorio
(LDSGAT)
Instituto de Ecología y Ciencias Ambientales (IECA)
Facultad de Ciencias
Universidad de la República
Montevideo-URUGUAY
################################################################

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list