2

I tried to install the package raster which gave me non-zero exit status because classInt is not installed.

I recently updated and upgraded all R packages and R-core (to 3.1) on Ubuntu.

Now if I try to install the package classInt from the CRAN repositories or even when doing it manually (download the tar.gz and setting the repos) I get the following error code:

package ‘classInt’ is not available (for R version 3.1.0)

Any idea on how to debug this?

The whole error outputs to complete the post:

> install.packages("raster")
Installing package into ‘/home/user/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/raster_2.2-31.tar.gz'
Content type 'application/x-gzip' length 1049759 bytes (1.0 Mb)
opened URL
==================================================
  downloaded 1.0 Mb

Error in library("classInt") : there is no package called ‘classInt’
Execution halted
Warning in install.packages :
  installation of package ‘raster’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpaJUU7d/downloaded_packages’
> 



  > install.packages("classInt")

Installing package into ‘/home/user/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
also installing the dependency ‘e1071’

trying URL 'http://cran.rstudio.com/src/contrib/e1071_1.6-3.tar.gz'
Content type 'application/x-gzip' length 583697 bytes (570 Kb)
opened URL
==================================================
  downloaded 570 Kb

trying URL 'http://cran.rstudio.com/src/contrib/classInt_0.1-21.tar.gz'
Content type 'application/x-gzip' length 18213 bytes (17 Kb)
opened URL
==================================================
  downloaded 17 Kb

Error in library("classInt") : there is no package called ‘classInt’
Execution halted
Warning in install.packages :
  installation of package ‘e1071’ had non-zero exit status
Error in library("classInt") : there is no package called ‘classInt’
Execution halted
Warning in install.packages :
  installation of package ‘classInt’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpaJUU7d/downloaded_packages’
> 


  > install.packages("~/R/Packages/classInt_0.1-21.tar.gz",repos=NULL, type="source")

Installing package into ‘/home/user/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Error in library("classInt") : there is no package called ‘classInt’
Execution halted
Warning in install.packages :
  installation of package ‘/home/user/R/Packages/classInt_0.1-21.tar.gz’ had non-zero exit status
> 

here the session info:

  > sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
[5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
[9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
  [1] tools_3.1.0

and options()

  > options()
$add.smooth
[1] TRUE

$bitmapType
[1] "cairo"

$browser
function (url) 
{
  .Call("rs_browseURL", url)
}
<environment: 0x45ec5b0>

  $browserNLdisabled
[1] FALSE

$CBoundsCheck
[1] FALSE

$check.bounds
[1] FALSE

$citation.bibtex.max
[1] 1

$continue
[1] "+ "

$contrasts
unordered           ordered 
"contr.treatment"      "contr.poly" 

$defaultPackages
[1] "datasets"  "utils"     "grDevices" "graphics"  "stats"     "methods"  

$demo.ask
[1] "default"

$deparse.cutoff
[1] 60

$device
[1] "RStudioGD"

$device.ask.default
[1] FALSE

$digits
[1] 7

$dvipscmd
[1] "dvips"

$echo
[1] TRUE

$editor
[1] "vi"

$encoding
[1] "native.enc"

$error
(function () 
{
  .rs.recordTraceback(userOnly)
})()

$example.ask
[1] "default"

$expressions
[1] 5000

$ggvis.renderer
[1] "svg"

$help.search.types
[1] "vignette" "demo"     "help"    

$help.try.all.packages
[1] FALSE

$help_type
[1] "html"

$HTTPUserAgent
[1] "R (3.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu)"

$internet.info
[1] 2

$keep.source
[1] TRUE

$keep.source.pkgs
[1] FALSE

$locatorBell
[1] TRUE

$mailer
[1] "mailto"

$max.print
[1] 10000

$menu.graphics
[1] FALSE

$na.action
[1] "na.omit"

$nwarnings
[1] 50

$OutDec
[1] "."

$pager
function (files, header, title, delete.file) 
{
  for (i in 1:length(files)) {
    if ((i > length(header)) || !nzchar(header[[i]])) 
      fileTitle <- title
    else fileTitle <- header[[i]]
    .Call("rs_showFile", fileTitle, files[[i]], delete.file)
  }
}
<environment: 0x44790f8>

  $papersize
[1] "a4"

$pdfviewer
[1] "/usr/bin/xdg-open"

$pkgType
[1] "source"

$printcmd
[1] "/usr/bin/lpr"

$prompt
[1] "> "

$repos
CRAN 
"http://cran.univ-paris1.fr/" 

$rl_word_breaks
[1] " \t\n\"\\'`><=%;,|&{()}"

$scipen
[1] 0

$show.coef.Pvalues
[1] TRUE

$show.error.messages
[1] TRUE

$show.signif.stars
[1] TRUE

$str
$str$strict.width
[1] "no"

$str$digits.d
[1] 3

$str$vec.len
[1] 4


$str.dendrogram.last
[1] "`"

$stringsAsFactors
[1] TRUE

$texi2dvi
[1] "/usr/bin/texi2dvi"

$timeout
[1] 60

$ts.eps
[1] 1e-05

$ts.S.compat
[1] FALSE

$unzip
[1] "/usr/bin/unzip"

$useFancyQuotes
[1] TRUE

$verbose
[1] FALSE

$viewer
function (url, height = NULL) 
{
  if (!is.character(url) || (length(url) != 1)) 
    stop("url must be a single element character vector.", 
         call. = FALSE)
  if (!is.null(height) && (!is.numeric(height) || (length(height) != 
                                                     1))) 
    stop("height must be a single element integer vector.", 
         call. = FALSE)
  invisible(.Call("rs_viewer", url, height))
}
<environment: 0x45ec5b0>

  $warn
[1] 0

$warning.length
[1] 1000

$width
[1] 122
joaoal
  • 1,892
  • 4
  • 19
  • 29
  • You can install it by hand (depends on which OS you are). See http://cran.r-project.org/web/packages/classInt/index.html If you're on Windows, I suggest you download the .zip file and install it via `install.packages("file.zip", repose = NULL)` and install `raster`. If this is the only dependency that hasn't been met, it should go through. – Roman Luštrik Apr 28 '14 at 08:51
  • @hrbrmstr: I tried it on several different mirrors...all give me the same error... – joaoal Apr 28 '14 at 10:15
  • 1st: re-entering my 1st comment as it got mangled somehow: What mirror are you using? `install.packages("classInt")` worked w/o issue on Ubuntu & OS X (R3.1). 2nd: A dump of `sessionInfo()` and (perhaps) `options()` (the latter you might need to sanitize first) might provide some illumination. `classInt` is at the very least in the RStudio CRAN repository: http://cran.rstudio.com/web/packages/classInt/index.html – hrbrmstr Apr 28 '14 at 10:21
  • @hrbrmstr: I edited my post regarding your comment. – joaoal Apr 28 '14 at 10:42
  • does e1071 install on its own? Try: `install.packages("e1071")` – Spacedman Apr 28 '14 at 11:41
  • @Spacedman: Unfortunatly not. Error message is `Error in library("classInt") : there is no package called ‘classInt’ Execution halted Warning in install.packages : installation of package ‘e1071’ had non-zero exit status` – joaoal Apr 28 '14 at 11:45
  • Stop trying to install classInt and JUST try and install e1071. I suspect the problem is NOT with classInt but with e1071. – Spacedman Apr 28 '14 at 13:15
  • I did so following the Code you provided...but what I got out was this error message. .. – joaoal Apr 28 '14 at 13:20
  • So when you try and install e1071 you get an error message about classInt? Well, then your R installation is partly screwed because e1071 doesn't care about classInt. Clear out your R package library and start again. – Spacedman Apr 28 '14 at 13:21
  • I suggest the conversation continues in http://chat.stackoverflow.com/rooms/25312/r-public – Roman Luštrik Apr 28 '14 at 13:32
  • I just had to leave for a meeting. Will try to reinstall the core and libraries tomorrow morning. – joaoal Apr 28 '14 at 13:33
  • I reinstalled the core with `sudo aptitude r-base-core` and all packages with `update.packages(checkBuilt=TRUE, ask=FALSE)` in R. Now the installation of ANY external package is not working anymore. Other users on Linux 64 bit expirience similar issues recently (http://stackoverflow.com/questions/23341697/r-i-cant-install-package-drc-in-r-3-0-1) so maybe it is a general bug? – joaoal Apr 29 '14 at 11:20

1 Answers1

2

Ok, turns out that the problem was, the use of .Rprofile. .Rprofile is a little script that is automatically executed at the beginning of each RSession. It should enhance your workflow since you can call some commonly used libraries there instead of calling them each and every time in your script.

When I still used R 2.15 I edited this profile with file.edit("/home/user/R/.Rprofile") and I called classInt with library("classInt"). Now, after upgrading to R 3.1 a new library path for the packages was created and one needs to reinstall most additional packages again. At that time I did not reinstall classInt.

Now what R did was to call every time classInt at startup which did not work since the package was not installed and a error message was produced: Error in library("classInt") : there is no package called 'classInt'. I always overlooked this message at startup since it did not affect me.

Now after deleting the line library("classInt") from .Rprofile I could install the raster package without any error message and I could also reinstall classInt or any other desired package. So I would guess it was a bug that R could not install any packages after unsuccessfully calling classInt at Session Startup.

joaoal
  • 1,892
  • 4
  • 19
  • 29