[R-SIG-Mac] Problems to install a package
Rainer M Krug
Rainer at krugs.de
Tue Jul 28 09:36:08 CEST 2015
Kevin Ushey <kevinushey at gmail.com> writes:
> 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),
I use this alternative exclusively, also for installing R and all
dependencies (effectively everything from the "Linux world") and I don't
think it is more work - on contrary - I think if=t is actually easier
and more transparent - but this might be because I come from the Linux
sphere of things and still think Linux - not OSX.
So in a nutshell, if you are used to Linux package managers, I would
recommend to use homebrew. If not, give it a try.
Cheers,
Rainer
> 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
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20150728/57c9d96b/attachment.bin>
More information about the R-SIG-Mac
mailing list