0

加载漩涡包时出现以下错误

library("swirl", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.2")
Error : .onAttach failed in attachNamespace() for 'swirl', details:
call: str_c(..., sep = " ")
error: lazy-load database '/home/ganesh/R/x86_64-pc-linux-gnu-library  /3.2/stringi/R/stringi.rdb' is corrupt
In addition: Warning messages:
1: In str_c(..., sep = " ") : restarting interrupted promise evaluation
2: In str_c(..., sep = " ") : internal error -3 in R_decompress1
Error: package or namespace load failed for ‘swirl’

如您所见,R 版本是 3.2,它在 Ubuntu 15.04 64 位上运行。

请求您的帮助。

谢谢

加内什

4

1 回答 1

0

Ubuntu 15.04 也在这里,一切都很好:

edd@max:~$ install.r swirl          ## install.r is part of littler
trying URL 'https://cran.rstudio.com/src/contrib/swirl_2.2.21.tar.gz'
Content type 'application/x-gzip' length 51037 bytes (49 KB)
==================================================
downloaded 49 KB

* installing *source* package ‘swirl’ ...
** package ‘swirl’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (swirl)

The downloaded source packages are in
        ‘/tmp/downloaded_packages’
edd@max:~$ r -e 'library(swirl); cat("All OK\n")'

| Hi! I see that you have some variables saved in your workspace. To keep
| things running smoothly, I recommend you clean up before starting swirl.

| Type ls() to see a list of the variables in your workspace. Then, type
| rm(list=ls()) to clear your workspace.

| Type swirl() when you are ready to begin.

All OK
edd@max:~$

正如你所看到的,包在这里安装干净,不需要任何依赖(可能是因为我已经安装了相当数量的包)并且加载得很好。

我经常从命令行安装和测试,并在littlerinstall.r中使用包装器——如果您想先安装它,请执行此操作。sudo apt-get install littler

于 2015-10-31T14:20:58.647 回答