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

Dirk Eddelbuettel edd at debian.org
Sat Oct 10 15:46:46 CEST 2009

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

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.


| > sessionInfo()
| R version 2.9.2 (2009-08-24)
| i486-pc-linux-gnu
| locale:
| 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.

More information about the R-devel mailing list