[R] Warning when running R - can't install packages either

Martin Morgan martin.morgan at roswellpark.org
Sat May 14 00:57:09 CEST 2016


Hi Jakub,

This is really a separate question. It is not really end-user related, 
and should be asked on the R-devel mailing list. Nonetheless, some 
answers below.

On 05/13/2016 03:55 PM, Jakub Jirutka wrote:
> Hi,
>
> I’m maintainer of the R package in Alpine Linux.
>
> I read on multiple places that some packages needs R_HOME variable
> set to the location where is R installed, so I’ve added it to the
> system-wide profile. Is this correct, or a misinformation?

R_HOME is set when R starts

~$ env|grep R_HOME
~$ R --vanilla -e "Sys.getenv('R_HOME')"
 > Sys.getenv('R_HOME')
[1] "/home/mtmorgan/bin/R-3-3-branch"

and (after reading the documentation in ?R_HOME it the R help system)

~$ R RHOME
/home/mtmorgan/bin/R-3-3-branch

so there is no need to set it in a system-wide profile. It is sometimes 
referenced inside an R package source tree that uses C or other compiled 
code in a Makevars file, as described in the 'Writing R Extensions' manual

https://cran.r-project.org/doc/manuals/r-release/R-exts.html
e.g., the section on configure and cleanup

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup

In these circumstances it has been set by the R process that is 
compiling the source code.

>
> What system dependencies does R need to compile modules from CRAN? On
> Alpine the following dependencies are needed to build R: bzip2-dev
> curl-dev gfortran lapack-dev pcre-dev perl readline-dev xz-dev
> zlib-dev. Are all of these dependencies needed for compiling
> modules?

As you say, those look like dependencies required to build R itself.

Individual packages may have dependencies on these or other system 
libraries, but many packages do not have system dependencies. It is up 
to the package maintainer to ensure that appropriate checks are made to 
discover the system resource; there are probably dozens or even hundreds 
of system dependencies amongst all of the CRAN packages. Typically the 
task of satisfying those dependencies is left to the user (or to those 
creating distributions of R packages, e.g., 
https://cran.r-project.org/bin/linux/debian/)

Martin Morgan

>
> Jakub
>
> On 13. May 2016, at 11:31, Martin Morgan
> <martin.morgan at roswellpark.org> wrote:
>
>>
>>
>> On 05/12/2016 10:25 PM, Alba Pompeo wrote:
>>> Martin Morgan, I tried an HTTP mirror and it worked. What could
>>> be the problem and how to fix? Also, should I ignore the warning
>>> about ignoring environment value of R_HOME?
>>
>> It depends on why you set the value in your environment in the
>> first place; maybe you were trying to use a particular installation
>> of R, but setting R_HOME is not the way to do that (I use an alias,
>> e.g., R-3.3='~/bin/R-3-3-branch/bin/R --no-save --no-restore
>> --silent')
>>
>> Martin
>>
>>> Thanks.
>>>
>>> On Thu, May 12, 2016 at 5:59 PM, Tom Hopper <tomhopper at gmail.com>
>>> wrote:
>>>> setInternet2() first thing after launching R might fix that.
>>>>
>>>>
>>>>> On May 12, 2016, at 07:45, Alba Pompeo <albapompeo at gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hello.
>>>>>
>>>>> I've tried to run R, but I receive many warnings and can't do
>>>>> simple stuff such as installing packages.
>>>>>
>>>>> Here's the full log when I run it.
>>>>>
>>>>> http://pastebin.com/raw/2BkNpTte
>>>>>
>>>>> Does anyone know what could be wrong here?
>>>>>
>>>>> Thanks a lot.
>>>>>
>>>>> ______________________________________________
>>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more,
>>>>> see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
>>>>> read the posting guide
>>>>> http://www.R-project.org/posting-guide.html and provide
>>>>> commented, minimal, self-contained, reproducible code.
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more,
>>> see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read
>>> the posting guide http://www.R-project.org/posting-guide.html and
>>> provide commented, minimal, self-contained, reproducible code.
>>>
>>
>>
>> This email message may contain legally privileged and/or
>> confidential information.  If you are not the intended
>> recipient(s), or the employee or agent responsible for the delivery
>> of this message to the intended recipient(s), you are hereby
>> notified that any disclosure, copying, distribution, or use of this
>> email message is prohibited.  If you have received this message in
>> error, please notify the sender immediately by e-mail and delete
>> this email message from your computer. Thank you.
>


This email message may contain legally privileged and/or...{{dropped:2}}



More information about the R-help mailing list