error on Windows OS

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

error on Windows OS

M.Ribeiro
I received by email an R package (file.tar.gz) that was created in Linux.
The package was already installed in another computer in linux using install.packages and it worked

I am not familiar with installing packages but I would like to install it on Windows

I downloaded the Rtools29.exe and tryed to install using

install.packages("foo.tar.gz", repos=NULL, type="source")
but the message was

Warning in install.packages("GR_1.0.tar.gz", repos = NULL, type = "source") :
  argument 'lib' is missing: using 'C:\Documents and Settings\mr\My Documents/R/win-library/2.9'
'sh' is not recognized as an internal or external command,
operable program or batch file.
Warning message:
In install.packages("GR_1.0.tar.gz", repos = NULL, type = "source") :
  installation of package 'GR_1.0.tar.gz' had non-zero exit status

my questios are:

Where shall I save the .tar.gz file??
Do I need to do anything else with the Rtools besides installing (C:/Rtools)??
Is the problem with the way I did or with the package??

Thanks a lot
Cheers
Reply | Threaded
Open this post in threaded view
|

Re: error on Windows OS [SEC=UNCLASSIFIED]

Augusto.Sanabria

Hi M. Ribeiro,

For Windows you need to download the correct
package (*.zip) not the Linux package. Once the windows
package has been downloaded into a directory,
you can install it directly from the R shell, see
Packages > install packages from local zip files.
Once the package has been installed you can
load it into your session using
Packages > load package
Or library("package_name")

Hope it helps,

Augusto

--------------------------------------------
Augusto Sanabria. MSc, PhD.
Mathematical Modeller
Risk & Impact Analysis Group
Geospatial & Earth Monitoring Division
Geoscience Australia (www.ga.gov.au)
Cnr. Jerrabomberra Av. & Hindmarsh Dr.
Symonston ACT 2601
Ph. (02) 6249-9155






-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of M.Ribeiro
Sent: Monday, 31 May 2010 11:47
To: [hidden email]
Subject: [R] error on Windows OS



I received by email an R package (file.tar.gz) that was created in Linux. The package was already installed in another computer in linux using install.packages and it worked

I am not familiar with installing packages but I would like to install it on Windows

I downloaded the Rtools29.exe and tryed to install using

install.packages("foo.tar.gz", repos=NULL, type="source")
but the message was

Warning in install.packages("GR_1.0.tar.gz", repos = NULL, type = "source")
:
  argument 'lib' is missing: using 'C:\Documents and Settings\mr\My Documents/R/win-library/2.9' 'sh' is not recognized as an internal or external command, operable program or batch file. Warning message: In install.packages("GR_1.0.tar.gz", repos = NULL, type = "source") :
  installation of package 'GR_1.0.tar.gz' had non-zero exit status

my questios are:

Where shall I save the .tar.gz file??
Do I need to do anything else with the Rtools besides installing (C:/Rtools)?? Is the problem with the way I did or with the package??

Thanks a lot
Cheers
--
View this message in context: http://r.789695.n4.nabble.com/error-on-Windows-OS-tp2236758p2236758.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: error on Windows OS

Duncan Murdoch-2
In reply to this post by M.Ribeiro
M.Ribeiro wrote:

> I received by email an R package (file.tar.gz) that was created in Linux.
> The package was already installed in another computer in linux using
> install.packages and it worked
>
> I am not familiar with installing packages but I would like to install it on
> Windows
>
> I downloaded the Rtools29.exe and tryed to install using
>
> install.packages("foo.tar.gz", repos=NULL, type="source")
> but the message was
>
> Warning in install.packages("GR_1.0.tar.gz", repos = NULL, type = "source")
> :
>   argument 'lib' is missing: using 'C:\Documents and Settings\mr\My
> Documents/R/win-library/2.9'
>  

That's a funny name to use for the library for R 2.10.x, but it's not a
serious error.
> 'sh' is not recognized as an internal or external command,
> operable program or batch file.
>  

That's the one that stopped the install.  Apparently the Rtools bin
directory is not being found by Windows in your PATH.  The Rtools
installer can put it there; maybe you should just reinstall Rtools and
choose that option.
> Warning message:
> In install.packages("GR_1.0.tar.gz", repos = NULL, type = "source") :
>   installation of package 'GR_1.0.tar.gz' had non-zero exit status
>
> my questios are:
>
> Where shall I save the .tar.gz file??
>  

That doesn't matter, as long as it's a readable directory.
> Do I need to do anything else with the Rtools besides installing
> (C:/Rtools)??
>  

Set the Windows PATH variable.
> Is the problem with the way I did or with the package??
>
>  
So far it looks like the Rtools install.

Duncan Murdoch
> Thanks a lot
> Cheers
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: error on Windows OS

Peter Dalgaard-3

On May 31, 2010, at 12:53 PM, Duncan Murdoch wrote:

>
> That's the one that stopped the install.  Apparently the Rtools bin directory is not being found by Windows in your PATH.  The Rtools installer can put it there; maybe you should just reinstall Rtools and choose that option.

Also notice that installers cannot the PATH settings of a running process. I.e., you need to (re)start R after installing Rtools before install.packages has a chance of finding the tools.

--
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: error on Windows OS

M.Ribeiro
In reply to this post by Duncan Murdoch-2
Thanks for all the help,

So let me undestand,
The Rtools is currently installed in

c:\Rtools\bin;
c:\Rtools\perl\bin;
c:\Rtools\MinGW\bin;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
C:\Program Files (x86)\QuickTime\QTSystem\;
C:\Program Files (x86)\SAS\Shared Files\Formats  ####(I don't know why in here)

Should I re-install in a C:/Windows/Rtools directory ?

Thanks again
Cheers
Reply | Threaded
Open this post in threaded view
|

Re: error on Windows OS

M.Ribeiro
In reply to this post by M.Ribeiro
Ok,
I re-installed the Rtools (now Rtools211 because I was in another computer with R version 2.10) , and the message now when I tried to install the package was

Warning: invalid package 'GWSR_1.0.tar.gz'
Erro: ERROR: no packages specified
Warning message:
In install.packages("GWSR_1.0.tar.gz", repos = NULL, type = "source") :
  installation of package 'GWSR_1.0.tar.gz' had non-zero exit status


Any Clue?

Thanks a lot
Cheers
Reply | Threaded
Open this post in threaded view
|

Re: error on Windows OS

Duncan Murdoch-2
On 31/05/2010 9:13 AM, M.Ribeiro wrote:

> Ok,
> I re-installed the Rtools (now Rtools211 because I was in another computer
> with R version 2.10) , and the message now when I tried to install the
> package was
>
> Warning: invalid package 'GWSR_1.0.tar.gz'
> Erro: ERROR: no packages specified
> Warning message:
> In install.packages("GWSR_1.0.tar.gz", repos = NULL, type = "source") :
>   installation of package 'GWSR_1.0.tar.gz' had non-zero exit status
>
>
> Any Clue?


I would guess that the package didn't exist in the current directory.

I'd recommend working in the CMD window rather than in R (using "Rcmd
INSTALL GWSR_1.0.tar.gz"); it is sometimes tricky to see what the state
of the system is from R.


Duncan Murdoch

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: error on Windows OS [SEC=UNCLASSIFIED]

Richard M. Heiberger
In reply to this post by Augusto.Sanabria
M.Ribeiro,

You can install on Windows from the tar.gz using the RTools.
You need to set the PATH to find RTools and it looks like you skipped that
step.
Full details are in the R Extensions manual.

Here are my notes, from several years ago as you can see by the R-2.8.0
paths
and the Rtools29.exe set of tools, for running from the MSDOS CMD window.

Change all R-2.8.0 statements to the current version.
Change the cd statement to the directory containing the .tar.gz file.

Rich




Download from
http://www.murdoch-sutherland.com/Rtools/
Rtools29.exe
and install into default locations.
In an MS-DOS Commands Window --- cmd in the Start > Run window
PATH=c:\Rtools\bin;c:\Rtools\perl\bin;c:\Rtools\MinGW\bin;c:\texmf\miktex\bin;c:\progra~1\RExcel\R-2.8.0\bin;c:\windows;c:\windows\system32
rem
^^^^^^^^^^^^^^^^^^^^^^^^^^
rem use correct 8.3 path for the R version that you are using.
c:\
cd C:\mydirectory
rem MyPackage\ is a directory in the above directory
R CMD CHECK --no-examples --no-latex MyPackage  ## detailed checks---faster
R CMD CHECK                          MyPackage  ## detailed checks
R CMD INSTALL --build                MyPackage  ## installs and builds .zip
rem this gives the official canonical form that will eventually be sent to
CRAN
rem R CMD BUILD                          MyPackage  ## tar.gz
rem problems appear in this file:
C:\mydirectory\MyPackage.Rcheck\00install.out

relevant documents are in
C:\Program Files\RExcel\R-2.8.0\doc\manual\R-admin.html
C:\Program Files\RExcel\R-2.8.0\doc\manual\R-exts.html

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.