[R] R 3.0.3, Windows 7: Problem installing XML package

Duncan Murdoch murdoch.duncan at gmail.com
Sun Apr 20 23:26:45 CEST 2014


On 20/04/2014, 2:45 PM, Alpesh Pandya wrote:
> I keep on trying from various networks but I still get the same error. I
> don't this this has anything to do with network or ability to download the
> package (as I can install other packages fine). This must be something in
> base R or dependencies issues (that R is not spelling out).

This is very clearly a problem with your setup, not with R:  nobody else 
is reporting it.

What you should do is download the .zip file using some other means 
(e.g. Firefox, etc.) and check whether the size comes out properly 
(4,288,694 bytes; not sure why you saw the numbers you saw).  If it 
does, then install the package from the .zip file.  If it doesn't, then 
tell your IT people to fix your system.

Duncan Murdoch

>
> I know R is geared for Mac and Windows is kind of looked down upon but I
> have no option but use windows and need this XML package running to
> complete my education. Any help on this would be appreciated.
>
>
> On Mon, Apr 14, 2014 at 2:24 PM, Alpesh Pandya <alpeshpandya at gmail.com>wrote:
>
>> Thank you for response Rui.
>>
>> I still get the same error with this repository.
>>
>> Installing package into ‘C:/Users/APandya/Documents/R/win-library/3.0’
>> (as ‘lib’ is unspecified)
>> trying URL '
>> http://cran.dcc.fc.up.pt/bin/windows/contrib/3.0/XML_3.98-1.1.zip'
>> Content type 'application/zip' length 4288136 bytes (4.1 Mb)
>> opened URL
>> downloaded 4.1 Mb
>>
>> 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 4276224 != reported length 4288136
>> 2: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
>> 3: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
>>    cannot open compressed file 'XML/DESCRIPTION', probable reason 'No such
>> file or directory'
>>
>>
>>
>> On Mon, Apr 14, 2014 at 2:17 PM, Rui Barradas <ruipbarradas at sapo.pt>wrote:
>>
>>> Hello,
>>> I have package XML installed on Windows 7, R 3.0.3 and I had no problem
>>> at all. Can't you try (it worked with me)
>>>
>>> install.packages("XML", repos = "http://cran.dcc.fc.up.pt")
>>>
>>> Hope this helps,
>>>
>>> Rui Barradas
>>>
>>> Em 14-04-2014 16:24, Alpesh Pandya escreveu:
>>>
>>>   I have tried these sources (almost all US mirrors):
>>>>
>>>> http://cran.cnr.Berkeley.edu/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://cran.stat.ucla.edu/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://streaming.stat.iastate.edu/CRAN/bin/windows/contrib/
>>>> 3.0/XML_3.98-1.1.zip
>>>> http://ftp.ussg.iu.edu/CRAN/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://rweb.quant.ku.edu/cran/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://watson.nci.nih.gov/cran_mirror/bin/windows/
>>>> contrib/3.0/XML_3.98-1.1.zip
>>>> http://cran.mtu.edu/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://cran.wustl.edu/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://cran.case.edu/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://ftp.osuosl.org/pub/cran/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>> http://lib.stat.cmu.edu/R/CRAN/bin/windows/contrib/3.0/XML_3.98-1.1.zip
>>>>
>>>> I have confirmed with IT that there is no restriction on downloading this
>>>> zip file from any of these sources. Also I am getting same error when I
>>>> try
>>>> from my home network as well.
>>>>
>>>>
>>>> On Sun, Apr 13, 2014 at 9:46 AM, Uwe Ligges <
>>>> ligges at statistik.tu-dortmund.de
>>>>
>>>>> wrote:
>>>>>
>>>>
>>>>
>>>>>
>>>>> On 13.04.2014 01:30, Alpesh Pandya wrote:
>>>>>
>>>>>   @Uwe I tried the same steps from office as well as home network with
>>>>>> same
>>>>>> results. Are you using windows 7 with R 3.0.3?
>>>>>>
>>>>>> I have seen same question being asked by others without any
>>>>>> resolution. Is
>>>>>> anything special about XML package? I am OK use older version of
>>>>>> package
>>>>>> but in archives there are no zip files (only gz files). Is windows
>>>>>> platform
>>>>>> not recommended for R?
>>>>>>
>>>>>>
>>>>> Right, and you can try to install these from sources.
>>>>> But I doubt you need it. You still have not told us if you tried another
>>>>> mirror to download the XML file from and what you local IT support tells
>>>>> you while your downloads are incomplete.
>>>>>
>>>>> Best,
>>>>> Uwe Ligges
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> On Sat, Apr 12, 2014 at 7:22 PM, Uwe Ligges <
>>>>>> ligges at statistik.tu-dortmund.de
>>>>>>
>>>>>>   wrote:
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>> On 12.04.2014 22:39, Alpesh Pandya wrote:
>>>>>>>
>>>>>>>    Thank you for response Uwe. I tried multiple times by downloading
>>>>>>> the
>>>>>>>
>>>>>>>> zip
>>>>>>>> file from many sources but still the same error. This is a major road
>>>>>>>> block
>>>>>>>> for me in using R. Appreciate any help on this.
>>>>>>>>
>>>>>>>>
>>>>>>>>   Please ask your local IT staff.
>>>>>>>
>>>>>>> I get, using the same mirror:
>>>>>>>
>>>>>>>    options("repos"=c(CRAN="http://watson.nci.nih.gov/cran_mirror"))
>>>>>>>
>>>>>>>> install.packages("XML", lib="d:/temp")
>>>>>>>>
>>>>>>>>
>>>>>>> trying URL 'http://watson.nci.nih.gov/cran_mirror/bin/windows/
>>>>>>>
>>>>>>> contrib/3.0/XML_3.98-1.1.zip'
>>>>>>> Content type 'application/zip' length 4288136 bytes (4.1 Mb)
>>>>>>> opened URL
>>>>>>> downloaded 4.1 Mb
>>>>>>>
>>>>>>> package 'XML' successfully unpacked and MD5 sums checked
>>>>>>>
>>>>>>> The downloaded binary packages are in
>>>>>>>            d:\temp\RtmpqMqL8L\downloaded_packages
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Best,
>>>>>>> Uwe Ligges
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>   On Fri, Apr 11, 2014 at 6:53 PM, Uwe Ligges <
>>>>>>>> ligges at statistik.tu-dortmund.de
>>>>>>>>
>>>>>>>>    wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>      Works for me.
>>>>>>>>
>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Uwe Ligges
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 11.04.2014 17:10, Alpesh Pandya wrote:
>>>>>>>>>
>>>>>>>>>     Using install.package('XML') command produces this error:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> trying URL
>>>>>>>>>> '
>>>>>>>>>> http://watson.nci.nih.gov/cran_mirror/bin/windows/
>>>>>>>>>> contrib/3.0/XML_3.98-1.1.zip
>>>>>>>>>> '
>>>>>>>>>> Content type 'application/zip' length 4288136 bytes (4.1 Mb)
>>>>>>>>>> opened URL
>>>>>>>>>> downloaded 4.1 Mb
>>>>>>>>>>
>>>>>>>>>> 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 4276224 != reported length 4288136
>>>>>>>>>> 2: In unzip(zipname, exdir = dest) : error 1 in extracting from zip
>>>>>>>>>> file
>>>>>>>>>> 3: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package",
>>>>>>>>>> "Type"))
>>>>>>>>>> :
>>>>>>>>>>        cannot open compressed file 'XML/DESCRIPTION', probable
>>>>>>>>>> reason
>>>>>>>>>> 'No
>>>>>>>>>> such
>>>>>>>>>> file or directory'
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Upon receiving this error, I downloaded XML_3.98-1.1.zip directly
>>>>>>>>>> from
>>>>>>>>>> cran
>>>>>>>>>> site. But this zip file is not a valid archive (cannot open using
>>>>>>>>>> winzip).
>>>>>>>>>> Also trying to install using this downloaded file produces the
>>>>>>>>>> following
>>>>>>>>>> error:
>>>>>>>>>>
>>>>>>>>>> Installing package into 'C:/Users/APandya/Documents/R/
>>>>>>>>>> win-library/3.0'
>>>>>>>>>> (as 'lib' is unspecified)
>>>>>>>>>> Warning in install.packages :
>>>>>>>>>>        error 1 in extracting from zip file
>>>>>>>>>> Warning in install.packages :
>>>>>>>>>>        cannot open compressed file 'XML/DESCRIPTION', probable
>>>>>>>>>> reason
>>>>>>>>>> 'No
>>>>>>>>>> such
>>>>>>>>>> file or directory'
>>>>>>>>>> Error in install.packages : cannot open the connection
>>>>>>>>>>
>>>>>>>>>> I  downloaded this zip file from multiple sources and tried to
>>>>>>>>>> install
>>>>>>>>>> with
>>>>>>>>>> same result.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>> --
>> Thanks and Regards
>> Alpesh
>>
>
>
>
>
>
> ______________________________________________
> 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