This question already has an answer here:
这个问题在这里已有答案:
- How should I deal with “package 'xxx' is not available (for R version x.y.z)” warning? 14 answers
- 我怎么处理“包'xxx'不可用(对于R版x.y.z)”警告? 14个答案
I tried to install the package raster
which gave me non-zero exit status because classInt
is not installed.
我试图安装包raster,它给了我非零退出状态,因为没有安装classInt。
I recently updated and upgraded all R packages and R-core (to 3.1) on Ubuntu.
我最近更新并升级了Ubuntu上的所有R软件包和R-core(到3.1)。
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:
现在,如果我尝试从CRAN存储库安装包classInt,或者甚至手动执行它(下载tar.gz并设置repos),我会收到以下错误代码:
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
1 个解决方案
#1
1
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.
好的,原来问题是,使用.Rprofile。 .Rprofile是一个在每个RSession开始时自动执行的小脚本。它应该增强您的工作流程,因为您可以在那里调用一些常用的库,而不是每次在脚本中调用它们。
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.
当我仍然使用R 2.15时,我使用file.edit(“/ home / user / R / .Rprofile”)编辑了这个配置文件,并且我使用库(“classInt”)调用了classInt。现在,在升级到R 3.1之后,创建了包的新库路径,并且需要再次重新安装大多数其他包。那时我没有重新安装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.
现在R所做的就是每次启动时都会调用classInt,因为没有安装包,所以没有工作,并且产生了错误信息:库中的错误(“classInt”):没有名为'classInt'的包。我在启动时总是忽略这个消息,因为它不会影响我。
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.
现在从.Rprofile删除行库(“classInt”)后,我可以安装raster包而不会出现任何错误消息,我也可以重新安装classInt或任何其他所需的包。所以我猜这是一个错误,R在Session Startup调用classInt失败后无法安装任何软件包。
#1
1
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.
好的,原来问题是,使用.Rprofile。 .Rprofile是一个在每个RSession开始时自动执行的小脚本。它应该增强您的工作流程,因为您可以在那里调用一些常用的库,而不是每次在脚本中调用它们。
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.
当我仍然使用R 2.15时,我使用file.edit(“/ home / user / R / .Rprofile”)编辑了这个配置文件,并且我使用库(“classInt”)调用了classInt。现在,在升级到R 3.1之后,创建了包的新库路径,并且需要再次重新安装大多数其他包。那时我没有重新安装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.
现在R所做的就是每次启动时都会调用classInt,因为没有安装包,所以没有工作,并且产生了错误信息:库中的错误(“classInt”):没有名为'classInt'的包。我在启动时总是忽略这个消息,因为它不会影响我。
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.
现在从.Rprofile删除行库(“classInt”)后,我可以安装raster包而不会出现任何错误消息,我也可以重新安装classInt或任何其他所需的包。所以我猜这是一个错误,R在Session Startup调用classInt失败后无法安装任何软件包。