[R] package installation from source

Duncan Murdoch murdoch at stats.uwo.ca
Mon Oct 19 12:24:47 CEST 2009


Petr PIKAL wrote:
> Hi
>
> Duncan Murdoch <murdoch at stats.uwo.ca> napsal dne 16.10.2009 17:01:59:
>
>   
>> On 10/16/2009 9:31 AM, Petr PIKAL wrote:
>>     
>>> Dear all
>>>
>>> I noticed from NEWS 2.11.0,dev
>>> SIGNIFICANT USER-VISIBLE CHANGES
>>>
>>>     o   Packages must have been installed under R 2.10.0 or later, as
>>>         the current help system is the only one now supported.
>>>
>>> So I tried to follow instructions in manual, Duncan Murdoch 
>>>       
> presentation 
>   
>>> and help pages to prepare and accomplish installation of a set of 
>>> functions I use. However in R 2.11.0dev and too in R 2.10.0dev I was 
>>>       
> not 
>   
>>> able to finish it.
>>>
>>>       
>
> < snip>
>
>   
>>>> install.packages("D:/temp/fun", repos=NULL, type="source")
>>>>         
>>> sh nenˇ n zvem vnitýnˇho ani vnŘjçˇho pýˇkazu,
>>> spustiteln‚ho programu nebo d vkov‚ho souboru.
>>> Warning message:
>>> In install.packages("D:/temp/fun", repos = NULL, type = "source") :
>>>   installation of package 'D:/temp/fun' had non-zero exit status
>>>
>>> which basically tells that sh is not a name of command, exe or bat 
>>>       
> file.
>   
>> There should be a sh.exe in d:\programy\Rtools\bin if that's where you 
>> installed the Rtools.  Are you sure you have the path set the way you 
>>     
>
> Yes there is it
>  
>   
>> list.files("D:/programy/Rtools/bin")
>>     
>  [1] "basename.exe"       "cat.exe"            "cmp.exe" 
>
> < snip> 
> 40] "sh.exe"             "sort.exe"           "tar.exe" 
> [43] "texindex.exe"       "touch.exe"          "tr.exe" 
> [46] "uniq.exe"           "unzip.exe"          "wc.exe" 
> [49] "zip.exe" 
>   
>
>   
>> think you do?  Remember that PATH is an environment variable, and 
>> environment variable settings are local:  so setting the PATH in a CMD 
>> window has no effect on R or any other command window.  You need to use 
>>     
>
> Hm. It is a problem. I do not have admin rights. Therefore I set PATH in 
> the command window and used the same window to issue R CMD INSTALL fun, 
> but it gave me the same error message as above. 
>   

That should have worked.  Just to confirm, try running R from that shell 
(using either Rgui or R), and then print Sys.getenv("PATH") and make 
sure it shows what you expected.
>   
>> the Control Panel to set the default system path, and then restart any 
>> process that needs to see it.
>>     
>
> As I can not change system wide PATH I tried to set user PATH. This 
> resulted in modified PATH value but the required values for installation 
> was at the end and I got the same error.
>   

Yes, I believe Windows always puts the user PATH after the system one.
> As I am not sure if our IT guys change the system path for me 
> (permanently) I would like to know if there is some workaround like few 
> years before with make, make install etc. Maybe more complicated but 
> without need to fiddle with PATH value.
>
>   

I think you'll need to fiddle with the PATH, but maybe not at the system 
level.  I would do what you did (setting it in the command window).  You 
just need to figure out what went wrong.

Duncan Murdoch
> Thank you and best regards
> Petr
>
>   
>> Duncan Murdoch
>>
>>     
>>> The same I get when I try to run
>>>
>>> D:\temp R CMD INSTALL fun
>>>
>>> Please can you give me any suggestion for making installation work. I 
>>> remember when going from 1.9 to 2.0 versions it was also necessary to 
>>> install my bunch of functions, however at that time I need to use 
>>> something like make, make install  or so and gather all necessary 
>>>       
> programs 
>   
>>> myself.
>>>
>>> Best regards
>>> Petr
>>>
>>>
>>>
>>>
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> 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
> 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.
>




More information about the R-help mailing list