From edd at debian.org  Sat Oct 10 15:46:46 2009
From: edd at debian.org (Dirk Eddelbuettel)
Date: Sat, 10 Oct 2009 08:46:46 -0500
Subject: [Rd] installing any package fails using
	'install.packages()'	(PR#13993)
In-Reply-To: <20091010032510.EBA84282EF2D@mail.pubhealth.ku.dk>
References: <20091010032510.EBA84282EF2D@mail.pubhealth.ku.dk>
Message-ID: <19152.36934.405635.724179@ron.nulle.part>


On 10 October 2009 at 05:25, lmramba at gmail.com wrote:
| Dear all,
| I  installed my R-2.9.2 on my ubuntu version 9.04 successfully  using the
| command
| 
|    sudo apt-get install r-base-dev
| 
| The problem is that I cannot install any package.

Huh?  This has _nothing_ to do with the error below.
 
| See my details below:
| 
| 
| 
| > install.packages("epicalc")
| Warning in install.packages("epicalc") :
|   argument 'lib' is missing: using
| '/home/lmramba/R/i486-pc-linux-gnu-library/2.9'

This is suspicuous. 

If you used the Ubuntu package, it would use /usr/local/lib/R/site-library by
default.  So if you have a locally built version *you* need to figure out
what you broke there.

| --- Please select a CRAN mirror for use in this session ---
| Loading Tcl/Tk interface ... done
| Error in read.dcf(file = tmpf) : Line starting '<html> ...' is malformed!
| >
| > install.packages("lattice")
| Warning in install.packages("lattice") :
|   argument 'lib' is missing: using
| '/home/lmramba/R/i486-pc-linux-gnu-library/2.9'
| Error in read.dcf(file = tmpf) : Line starting '<html> ...' is malformed!

No idea but you busted there. But it looks suspiciously like a local error on
your end.

Set an explicit argument for the repos, e.g. via ~/.Rprofile

    options("repos"="http://cran.us.r-project.org")    ## US mirror

(as I am in the US, adapt accordingly for a close mirror for you) to avoid
the tcl/tk query.  

That, again, works like a charm here on Ubuntu 9.10:

R> install.packages("epicalc")
Warning in install.packages("epicalc") :
  argument 'lib' is missing: using '/usr/local/lib/R/site-library'
trying URL 'http://cran.us.r-project.org/src/contrib/epicalc_2.9.2.5.tar.gz'
Content type 'application/x-gzip' length 201849 bytes (197 Kb)              
opened URL                                                                  
==================================================                          
downloaded 197 Kb                                                           

* Installing *source* package ?epicalc? ...
** R                                       
** data                                    
** demo                                    
** preparing package for lazy loading      
Loading required package: splines          
** help                                    
*** installing help indices                
 >>> Building/Updating help pages for package 'epicalc'
     Formats: text html latex example                  
  ANCdata                           text    html    latex
[...]
  use                               text    html    latex   example
  zap                               text    html    latex   example
** building package indices ...
* DONE (epicalc)

The downloaded packages are in
        ?/tmp/RtmpydkfiZ/downloaded_packages?
R>

If you install into /usr/local/lib/R/site-library, I recommend making that
directory's group mode one of the ones you have and set it to group-write.  I
typically make myself member of group 'staff' (or 'admin').

Again, in sum: not a bug in R and you just created extra work for R Core to
maintain the bug database.

Dirk


| > sessionInfo()
| R version 2.9.2 (2009-08-24)
| i486-pc-linux-gnu
| 
| locale:
| LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C
| 
| attached base packages:
| [1] stats     graphics  grDevices utils     datasets  methods   base
| 
| loaded via a namespace (and not attached):
| [1] tcltk_2.9.2 tools_2.9.2
| >
| 
| 	[[alternative HTML version deleted]]
| 
| ______________________________________________
| R-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Three out of two people have difficulties with fractions.



[Rd] installing any package fails using 'install.packages()' (PR#13993)
Dirk Eddelbuettel