Error installing packages

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

Error installing packages

Kevin E. Thorpe
Hello.

I am posting this on behalf of one of my students who is getting error
messages when installing some packages. I have not seen this before nor
have I been able to replicate it. I'm including the relevant (I think)
information. I get the students to install rms with dependencies. As you
can see, rms does get installed but when the attempt is made to attach
it, ggplot2 cannot be loaded. Thus I tried explicitly installing ggplot2
and you can see then ensuing errors below. I have included the
sessionInfo() at the end.

I hope someone can point me at a solution.


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

   Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

 > install.packages("rms",dependencies=TRUE)
Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL
'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/rms_4.5-0.zip'
Content type 'application/zip' length 1074995 bytes (1.0 MB)
downloaded 1.0 MB

package ‘rms’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
         C:\Users\Leticia\AppData\Local\Temp\Rtmpa0q2o2\downloaded_packages
 > library(rms)
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
versionCheck = vI[[j]]) :
   there is no package called ‘Rcpp’
Error: package ‘ggplot2’ could not be loaded
 > install.packages("ggplot2",dependencies=TRUE)
Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘maptools’

trying URL
'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/maptools_0.8-39.zip'
Content type 'application/zip' length 1816384 bytes (1.7 MB)
downloaded 0 bytes

trying URL
'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/ggplot2_2.1.0.zip'
Content type 'application/zip' length 1996146 bytes (1.9 MB)
downloaded 4096 bytes

Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package",
"Type")) :
   cannot open the connection
In addition: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
   downloaded length 0 != reported length 1816384
2: In download.file(url, destfile, method, mode = "wb", ...) :
   downloaded length 4096 != reported length 1996146
3: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
4: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
   cannot open compressed file 'maptools/DESCRIPTION', probable reason
'No such file or directory'
 > library(rms)
Loading required package: Hmisc
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
versionCheck = vI[[j]]) :
   there is no package called ‘Rcpp’
Error: package ‘ggplot2’ could not be loaded
 > session.info()
Error: could not find function "session.info"
 > sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 10586)

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252
LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Formula_1.2-1   survival_2.39-4 lattice_0.20-33

loaded via a namespace (and not attached):
[1] Matrix_1.2-6  tools_3.3.1   gtable_0.2.0  splines_3.3.1 grid_3.3.1
 >

--
Kevin E. Thorpe
Head of Biostatistics,  Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael's Hospital
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: [hidden email]  Tel: 416.864.5776  Fax: 416.864.3016

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

Re: Error installing packages

Marc Schwartz-3

> On Oct 19, 2016, at 6:54 AM, Kevin E. Thorpe <[hidden email]> wrote:
>
> Hello.
>
> I am posting this on behalf of one of my students who is getting error messages when installing some packages. I have not seen this before nor have I been able to replicate it. I'm including the relevant (I think) information. I get the students to install rms with dependencies. As you can see, rms does get installed but when the attempt is made to attach it, ggplot2 cannot be loaded. Thus I tried explicitly installing ggplot2 and you can see then ensuing errors below. I have included the sessionInfo() at the end.
>
> I hope someone can point me at a solution.
>
>
> R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
> Copyright (C) 2016 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>  Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> > install.packages("rms",dependencies=TRUE)
> Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
> (as ‘lib’ is unspecified)
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/rms_4.5-0.zip'
> Content type 'application/zip' length 1074995 bytes (1.0 MB)
> downloaded 1.0 MB
>
> package ‘rms’ successfully unpacked and MD5 sums checked
>
> The downloaded binary packages are in
>        C:\Users\Leticia\AppData\Local\Temp\Rtmpa0q2o2\downloaded_packages
> > library(rms)
> Loading required package: Hmisc
> Loading required package: lattice
> Loading required package: survival
> Loading required package: Formula
> Loading required package: ggplot2
> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
>  there is no package called ‘Rcpp’
> Error: package ‘ggplot2’ could not be loaded
> > install.packages("ggplot2",dependencies=TRUE)
> Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
> (as ‘lib’ is unspecified)
> also installing the dependency ‘maptools’
>
> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/maptools_0.8-39.zip'
> Content type 'application/zip' length 1816384 bytes (1.7 MB)
> downloaded 0 bytes
>
> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/ggplot2_2.1.0.zip'
> Content type 'application/zip' length 1996146 bytes (1.9 MB)
> downloaded 4096 bytes
>
> Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
>  cannot open the connection
> In addition: Warning messages:
> 1: In download.file(url, destfile, method, mode = "wb", ...) :
>  downloaded length 0 != reported length 1816384
> 2: In download.file(url, destfile, method, mode = "wb", ...) :
>  downloaded length 4096 != reported length 1996146
> 3: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
> 4: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
>  cannot open compressed file 'maptools/DESCRIPTION', probable reason 'No such file or directory'
> > library(rms)
> Loading required package: Hmisc
> Loading required package: ggplot2
> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
>  there is no package called ‘Rcpp’
> Error: package ‘ggplot2’ could not be loaded
> > session.info()
> Error: could not find function "session.info"
> > sessionInfo()
> R version 3.3.1 (2016-06-21)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 10 x64 (build 10586)
>
> locale:
> [1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
> [4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] Formula_1.2-1   survival_2.39-4 lattice_0.20-33
>
> loaded via a namespace (and not attached):
> [1] Matrix_1.2-6  tools_3.3.1   gtable_0.2.0  splines_3.3.1 grid_3.3.1
> >
>

Kevin,

My first reaction is that some of the downloaded packages were corrupted, therefore not properly installed. There may be a problem with the mirror and/or the internet connection was compromised. There are messages above indicating file length differences between what was downloaded versus what the server indicated as the file size.

You might try a different CRAN mirror to see if that resolves the issue, albeit, I just tried to directly download a couple of the zip files on my Mac from the same mirror and did not have any issues, so it may be a transient server problem.

It is also possible that if the local package installation on their computer is corrupted in some manner, you may need to delete all CRAN based packages they installed fully and re-install all of the packages that are required, so that you have a level of comfort in the integrity of the local package installation.

Regards,

Marc Schwartz

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

Re: Error installing packages

Jeff Newmiller
In reply to this post by Kevin E. Thorpe
Different mirror?
--
Sent from my phone. Please excuse my brevity.

On October 19, 2016 4:54:50 AM PDT, "Kevin E. Thorpe" <[hidden email]> wrote:

>Hello.
>
>I am posting this on behalf of one of my students who is getting error
>messages when installing some packages. I have not seen this before nor
>
>have I been able to replicate it. I'm including the relevant (I think)
>information. I get the students to install rms with dependencies. As
>you
>can see, rms does get installed but when the attempt is made to attach
>it, ggplot2 cannot be loaded. Thus I tried explicitly installing
>ggplot2
>and you can see then ensuing errors below. I have included the
>sessionInfo() at the end.
>
>I hope someone can point me at a solution.
>
>
>R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
>Copyright (C) 2016 The R Foundation for Statistical Computing
>Platform: x86_64-w64-mingw32/x64 (64-bit)
>
>R is free software and comes with ABSOLUTELY NO WARRANTY.
>You are welcome to redistribute it under certain conditions.
>Type 'license()' or 'licence()' for distribution details.
>
>   Natural language support but running in an English locale
>
>R is a collaborative project with many contributors.
>Type 'contributors()' for more information and
>'citation()' on how to cite R or R packages in publications.
>
>Type 'demo()' for some demos, 'help()' for on-line help, or
>'help.start()' for an HTML browser interface to help.
>Type 'q()' to quit R.
>
> > install.packages("rms",dependencies=TRUE)
>Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
>(as ‘lib’ is unspecified)
>--- Please select a CRAN mirror for use in this session ---
>trying URL
>'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/rms_4.5-0.zip'
>Content type 'application/zip' length 1074995 bytes (1.0 MB)
>downloaded 1.0 MB
>
>package ‘rms’ successfully unpacked and MD5 sums checked
>
>The downloaded binary packages are in
>     C:\Users\Leticia\AppData\Local\Temp\Rtmpa0q2o2\downloaded_packages
> > library(rms)
>Loading required package: Hmisc
>Loading required package: lattice
>Loading required package: survival
>Loading required package: Formula
>Loading required package: ggplot2
>Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
>versionCheck = vI[[j]]) :
>   there is no package called ‘Rcpp’
>Error: package ‘ggplot2’ could not be loaded
> > install.packages("ggplot2",dependencies=TRUE)
>Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
>(as ‘lib’ is unspecified)
>also installing the dependency ‘maptools’
>
>trying URL
>'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/maptools_0.8-39.zip'
>Content type 'application/zip' length 1816384 bytes (1.7 MB)
>downloaded 0 bytes
>
>trying URL
>'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/ggplot2_2.1.0.zip'
>Content type 'application/zip' length 1996146 bytes (1.9 MB)
>downloaded 4096 bytes
>
>Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package",
>"Type")) :
>   cannot open the connection
>In addition: Warning messages:
>1: In download.file(url, destfile, method, mode = "wb", ...) :
>   downloaded length 0 != reported length 1816384
>2: In download.file(url, destfile, method, mode = "wb", ...) :
>   downloaded length 4096 != reported length 1996146
>3: In unzip(zipname, exdir = dest) : error 1 in extracting from zip
>file
>4: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type"))
>:
>   cannot open compressed file 'maptools/DESCRIPTION', probable reason
>'No such file or directory'
> > library(rms)
>Loading required package: Hmisc
>Loading required package: ggplot2
>Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
>versionCheck = vI[[j]]) :
>   there is no package called ‘Rcpp’
>Error: package ‘ggplot2’ could not be loaded
> > session.info()
>Error: could not find function "session.info"
> > sessionInfo()
>R version 3.3.1 (2016-06-21)
>Platform: x86_64-w64-mingw32/x64 (64-bit)
>Running under: Windows 10 x64 (build 10586)
>
>locale:
>[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252
>LC_MONETARY=English_Canada.1252
>[4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252
>
>attached base packages:
>[1] stats     graphics  grDevices utils     datasets  methods   base
>
>other attached packages:
>[1] Formula_1.2-1   survival_2.39-4 lattice_0.20-33
>
>loaded via a namespace (and not attached):
>[1] Matrix_1.2-6  tools_3.3.1   gtable_0.2.0  splines_3.3.1 grid_3.3.1
> >
>
>--
>Kevin E. Thorpe
>Head of Biostatistics,  Applied Health Research Centre (AHRC)
>Li Ka Shing Knowledge Institute of St. Michael's Hospital
>Assistant Professor, Dalla Lana School of Public Health
>University of Toronto
>email: [hidden email]  Tel: 416.864.5776  Fax: 416.864.3016
>
>______________________________________________
>[hidden email] 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.

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

Re: Error installing packages

David Winsemius
In reply to this post by Kevin E. Thorpe

> On Oct 19, 2016, at 4:54 AM, Kevin E. Thorpe <[hidden email]> wrote:
>
> Hello.
>
> I am posting this on behalf of one of my students who is getting error messages when installing some packages. I have not seen this before nor have I been able to replicate it. I'm including the relevant (I think) information. I get the students to install rms with dependencies. As you can see, rms does get installed but when the attempt is made to attach it, ggplot2 cannot be loaded. Thus I tried explicitly installing ggplot2 and you can see then ensuing errors below. I have included the sessionInfo() at the end.
>
> I hope someone can point me at a solution.
>
>
> R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
> Copyright (C) 2016 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>  Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> > install.packages("rms",dependencies=TRUE)
> Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
> (as ‘lib’ is unspecified)
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/rms_4.5-0.zip'
> Content type 'application/zip' length 1074995 bytes (1.0 MB)
> downloaded 1.0 MB
>
> package ‘rms’ successfully unpacked and MD5 sums checked
>
> The downloaded binary packages are in
>        C:\Users\Leticia\AppData\Local\Temp\Rtmpa0q2o2\downloaded_packages
> > library(rms)
> Loading required package: Hmisc
> Loading required package: lattice
> Loading required package: survival
> Loading required package: Formula
> Loading required package: ggplot2
> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
>  there is no package called ‘Rcpp’

When I try to debug the installation errors, I always first try to fix the first error. In this case it is because Rcpp was not installed. The use of dependencies=TRUE does not cause a recursive installation of dependencies of dependencies. I would have simply used:

install.packages('Rcpp", dependencies=TRUE)


> Error: package ‘ggplot2’ could not be loaded
> > install.packages("ggplot2",dependencies=TRUE)

That was not the problem.

> Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
> (as ‘lib’ is unspecified)
> also installing the dependency ‘maptools’
>
> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/maptools_0.8-39.zip'
> Content type 'application/zip' length 1816384 bytes (1.7 MB)
> downloaded 0 bytes
>
> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/ggplot2_2.1.0.zip'
> Content type 'application/zip' length 1996146 bytes (1.9 MB)
> downloaded 4096 bytes
>
> Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
>  cannot open the connection
> In addition: Warning messages:
> 1: In download.file(url, destfile, method, mode = "wb", ...) :
>  downloaded length 0 != reported length 1816384
> 2: In download.file(url, destfile, method, mode = "wb", ...) :
>  downloaded length 4096 != reported length 1996146
> 3: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
> 4: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
>  cannot open compressed file 'maptools/DESCRIPTION', probable reason 'No such file or directory'

The second error suggests a temporary difficulty in the download process. I'm guessing the user will not encounter it on a second attempt.


Best;
David.

> > library(rms)
> Loading required package: Hmisc
> Loading required package: ggplot2
> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
>  there is no package called ‘Rcpp’
> Error: package ‘ggplot2’ could not be loaded
> > session.info()
> Error: could not find function "session.info"
> > sessionInfo()
> R version 3.3.1 (2016-06-21)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 10 x64 (build 10586)
>
> locale:
> [1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
> [4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] Formula_1.2-1   survival_2.39-4 lattice_0.20-33
>
> loaded via a namespace (and not attached):
> [1] Matrix_1.2-6  tools_3.3.1   gtable_0.2.0  splines_3.3.1 grid_3.3.1
> >
>
> --
> Kevin E. Thorpe
> Head of Biostatistics,  Applied Health Research Centre (AHRC)
> Li Ka Shing Knowledge Institute of St. Michael's Hospital
> Assistant Professor, Dalla Lana School of Public Health
> University of Toronto
> email: [hidden email]  Tel: 416.864.5776  Fax: 416.864.3016
>
> ______________________________________________
> [hidden email] 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.

David Winsemius
Alameda, CA, USA

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

Re: Error installing packages

Richard M. Heiberger
I run into this type of problem quite frequently on Windows.
I see no rhyme or reason for when it happens.
It seems random as to which package it can't move.

The problem is at least a year old, and bit one of my students yesterday.

The specific is that there is a problem with copying from a temporary location

package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning: unable to move temporary installation
‘C:\Users\userid\Documents\R\win-library\3.3\file2bb4515e370d\Rcpp’ to
‘C:\Users\userid\Documents\R\win-library\3.3\Rcpp’

It isn't always Rcpp, although I think that is one of the more
frequently observed packages to display the problem.

Then there is a secondary problem that catches the attention of the
student.  Some other package that depends
on the missing one won't load.

I have three fixes:

1.  This usually works.  just do another
install.packages("Rcpp")

2.  This usually works when the first one doesn't

Keeping R open, manually move (with two Window Explorer windows) Rcpp from
C:\Users\userid\Documents\R\win-library\3.3\file2bb4515e370d\Rcpp
to
C:\Users\userid\Documents\R\win-library\3.3\Rcpp


3.  This is rarely needed because the first two usually work.
Copy the entire directory
C:\Users\userid\Documents\R\win-library\3.3\Rcpp
from one Windows computer onto a memory stick, and then
copy it from the memory stick to the other Windows computer.
It must be from Windows to Windows.  Method 3 will not work from Mac to Windows.

On Wed, Oct 19, 2016 at 11:31 AM, David Winsemius
<[hidden email]> wrote:

>
>> On Oct 19, 2016, at 4:54 AM, Kevin E. Thorpe <[hidden email]> wrote:
>>
>> Hello.
>>
>> I am posting this on behalf of one of my students who is getting error messages when installing some packages. I have not seen this before nor have I been able to replicate it. I'm including the relevant (I think) information. I get the students to install rms with dependencies. As you can see, rms does get installed but when the attempt is made to attach it, ggplot2 cannot be loaded. Thus I tried explicitly installing ggplot2 and you can see then ensuing errors below. I have included the sessionInfo() at the end.
>>
>> I hope someone can point me at a solution.
>>
>>
>> R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
>> Copyright (C) 2016 The R Foundation for Statistical Computing
>> Platform: x86_64-w64-mingw32/x64 (64-bit)
>>
>> R is free software and comes with ABSOLUTELY NO WARRANTY.
>> You are welcome to redistribute it under certain conditions.
>> Type 'license()' or 'licence()' for distribution details.
>>
>>  Natural language support but running in an English locale
>>
>> R is a collaborative project with many contributors.
>> Type 'contributors()' for more information and
>> 'citation()' on how to cite R or R packages in publications.
>>
>> Type 'demo()' for some demos, 'help()' for on-line help, or
>> 'help.start()' for an HTML browser interface to help.
>> Type 'q()' to quit R.
>>
>> > install.packages("rms",dependencies=TRUE)
>> Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
>> (as ‘lib’ is unspecified)
>> --- Please select a CRAN mirror for use in this session ---
>> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/rms_4.5-0.zip'
>> Content type 'application/zip' length 1074995 bytes (1.0 MB)
>> downloaded 1.0 MB
>>
>> package ‘rms’ successfully unpacked and MD5 sums checked
>>
>> The downloaded binary packages are in
>>        C:\Users\Leticia\AppData\Local\Temp\Rtmpa0q2o2\downloaded_packages
>> > library(rms)
>> Loading required package: Hmisc
>> Loading required package: lattice
>> Loading required package: survival
>> Loading required package: Formula
>> Loading required package: ggplot2
>> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
>>  there is no package called ‘Rcpp’
>
> When I try to debug the installation errors, I always first try to fix the first error. In this case it is because Rcpp was not installed. The use of dependencies=TRUE does not cause a recursive installation of dependencies of dependencies. I would have simply used:
>
> install.packages('Rcpp", dependencies=TRUE)
>
>
>> Error: package ‘ggplot2’ could not be loaded
>> > install.packages("ggplot2",dependencies=TRUE)
>
> That was not the problem.
>
>> Installing package into ‘C:/Users/Leticia/Documents/R/win-library/3.3’
>> (as ‘lib’ is unspecified)
>> also installing the dependency ‘maptools’
>>
>> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/maptools_0.8-39.zip'
>> Content type 'application/zip' length 1816384 bytes (1.7 MB)
>> downloaded 0 bytes
>>
>> trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.3/ggplot2_2.1.0.zip'
>> Content type 'application/zip' length 1996146 bytes (1.9 MB)
>> downloaded 4096 bytes
>>
>> Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
>>  cannot open the connection
>> In addition: Warning messages:
>> 1: In download.file(url, destfile, method, mode = "wb", ...) :
>>  downloaded length 0 != reported length 1816384
>> 2: In download.file(url, destfile, method, mode = "wb", ...) :
>>  downloaded length 4096 != reported length 1996146
>> 3: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
>> 4: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
>>  cannot open compressed file 'maptools/DESCRIPTION', probable reason 'No such file or directory'
>
> The second error suggests a temporary difficulty in the download process. I'm guessing the user will not encounter it on a second attempt.
>
>
> Best;
> David.
>
>> > library(rms)
>> Loading required package: Hmisc
>> Loading required package: ggplot2
>> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
>>  there is no package called ‘Rcpp’
>> Error: package ‘ggplot2’ could not be loaded
>> > session.info()
>> Error: could not find function "session.info"
>> > sessionInfo()
>> R version 3.3.1 (2016-06-21)
>> Platform: x86_64-w64-mingw32/x64 (64-bit)
>> Running under: Windows 10 x64 (build 10586)
>>
>> locale:
>> [1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
>> [4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] Formula_1.2-1   survival_2.39-4 lattice_0.20-33
>>
>> loaded via a namespace (and not attached):
>> [1] Matrix_1.2-6  tools_3.3.1   gtable_0.2.0  splines_3.3.1 grid_3.3.1
>> >
>>
>> --
>> Kevin E. Thorpe
>> Head of Biostatistics,  Applied Health Research Centre (AHRC)
>> Li Ka Shing Knowledge Institute of St. Michael's Hospital
>> Assistant Professor, Dalla Lana School of Public Health
>> University of Toronto
>> email: [hidden email]  Tel: 416.864.5776  Fax: 416.864.3016
>>
>> ______________________________________________
>> [hidden email] 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.
>
> David Winsemius
> Alameda, CA, USA
>
> ______________________________________________
> [hidden email] 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.

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

Re: Error installing packages

PaulJohnson32gmail
In reply to this post by David Winsemius
On Wed, Oct 19, 2016 at 10:31 AM, David Winsemius
<[hidden email]> wrote:
>
>> On Oct 19, 2016, at 4:54 AM, Kevin E. Thorpe <[hidden email]> wrote:
>>
>> Hello.
>>
>> I am posting this on behalf of one of my students who is getting error messages when installing some packages. I have not seen this before nor have I been able to replicate it. I'm including the relevant (I think) information. I get the students to install rms with dependencies. As you can see, rms does get installed but when the attempt is made to attach it, ggplot2 cannot be loaded. Thus I tried explicitly installing ggplot2 and you can see then ensuing errors below. I have included the sessionInfo() at the end.
>>
>> I hope someone can point me at a solution.
>>

I have just seen this on Win10 for the first time on a student's new
laptop.  Anti-virus software is possible reason for this, but I don't
know.

I did find a very direct solution.

WHen you run the package install, and it says "cannot move from
temporary C:\Users\yourname\AppData\XYZ to user directory
C:\Users\yourname\Documents\R\site-library", just move the folder
manually.  It works every time.

Unfortunately, Windows hides AppData.  In the Windows explorer view
options, tell it not to hide protected files.  Then in explorer
navigate into the user's AppData\Temp\Rxxx folder, you'll see the
downloaded zip files there for Rcpp and such.  Doubleclick the zip
file, right click copy the directory name "Rcpp" and paste it into the
user's R folder, under C:/Users/yourname/Documents/R/3.3/site-library
(or whatever that's called).

We ran into about 2 packages that have this failure to copy from
temporary space, but this old-fashioned copy a folder over method
worked fine. After this, R was able to load Rcpp, RcppEigen.

There is no indication that those R files are in a virus quarantine,
so I can't say for sure the security software is the cause.  At first,
I thought the problem was the usual one that we have been aware of for
some time--Windows thinks those files are in use and will not replace
them.

 We are trying to remove a layer of virus protection programs
installed by Dell to see if this happens later. If I hear back from
that student, I'll let you know. Another layer in this story is that
her 30 day free trials were expired, and I have feeling this means
that not only is McAfee still installed, but it is also running but
refusing to let you interact with it.

pj

--
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

I only use this account for email list memberships. To write directly,
address me at pauljohn at ku.edu.

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