我正在尝试将doParallel
软件包安装在我没有 root 权限的共享集群(平台:x86_64-redhat-linux-gnu)上。集群正在运行 R 版本 3.5.0(我已经询问是否可以更新)。
我已经粘贴了install.packages("doParallel",dependencies=T)
下面的输出。R 声明dplyr
需要recipes
但无法找到。但是我已经安装dplyr
并且可以毫无问题地加载它。另一个需要的包doParallel
是caret
,它又需要recipes
. 由于之前的安装caret
失败,安装失败recipes
。R 还声称foreach
需要doParallel
但无法找到,即使我之前安装了它并且可以加载它。
我试过单独安装这些包,但它导致许多其他依赖项和 R 抱怨包不可用。对于类似的问题,我已经尝试了许多关于 SO 的建议,包括:
- 删除旧的 R 库并重新安装包
- 手动安装依赖包(将源文件放在 R 应该能够找到它们的地方)
- 关闭所有 R 进程并重新启动
- 许多解决方案似乎涉及 Windows 安装和使用 RStudio 的问题。这些无关紧要,因为这是一台 linux 机器,我正在从命令行执行所有操作。
R 在尝试安装时会给出以下警告消息doParallel
:
警告:包 'dplyr' 是在 R 版本 3.5.3 下构建的
也许这就是问题的根源。不幸的是,我无法控制集群上的 R 更新。
感谢您提供有关解决方案的任何建议。
添加@r2evans 请求的输出(感谢您对此进行调查):
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] 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
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] 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] compiler_3.5.0
> .libPaths()
[1] "/<path to personal library>" "/usr/lib64/R/library"
[3] "/usr/share/R/library"
> install.packages("doParallel",dependencies=T)
Installing package into ‘...’ <path omitted for security reasons>
(as ‘lib’ is unspecified)
also installing the dependencies ‘recipes’, ‘caret’
trying URL 'https://cran.us.r-project.org/src/contrib/recipes_0.1.13.tar.gz'
Content type 'application/octet-stream' length 633375 bytes (618 KB)
==================================================
downloaded 618 KB
trying URL 'https://cran.us.r-project.org/src/contrib/caret_6.0-86.tar.gz'
Content type 'application/octet-stream' length 5264447 bytes (5.0 MB)
==================================================
downloaded 5.0 MB
trying URL 'https://cran.us.r-project.org/src/contrib/doParallel_1.0.15.tar.gz'
Content type 'application/octet-stream' length 173578 bytes (169 KB)
==================================================
downloaded 169 KB
* installing *source* package ‘recipes’ ...
** package ‘recipes’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Warning: package ‘dplyr’ was built under R version 3.5.3
** help
*** installing help indices
converting help for package ‘recipes’
finding HTML links ... done
add_step html
bake html
finding level-2 HTML links ... done
check_class html
check_cols html
check_missing html
check_name html
check_new_values html
check_range html
check_type html
detect_step html
discretize html
fixed html
format_ch_vec html
formula.recipe html
fully_trained html
has_role html
juice html
names0 html
prep html
prepper html
print.recipe html
rand_id html
recipe html
recipes-internal html
recipes html
recipes_pkg_check html
reexports html
roles html
selections html
step html
step_BoxCox html
step_YeoJohnson html
step_arrange html
step_bagimpute html
step_bin2factor html
step_bs html
step_center html
step_classdist html
step_corr html
step_count html
step_cut html
step_date html
step_depth html
step_discretize html
step_downsample html
step_dummy html
step_factor2string html
step_filter html
step_geodist html
step_holiday html
step_hyperbolic html
step_ica html
step_integer html
step_interact html
step_intercept html
step_inverse html
step_invlogit html
step_isomap html
step_knnimpute html
step_kpca html
step_kpca_poly html
step_kpca_rbf html
step_lag html
step_lincomb html
step_log html
step_logit html
step_lowerimpute html
step_meanimpute html
step_medianimpute html
step_modeimpute html
step_mutate html
step_mutate_at html
step_naomit html
step_nnmf html
step_normalize html
step_novel html
step_ns html
step_num2factor html
step_nzv html
step_ordinalscore html
step_other html
step_pca html
step_pls html
step_poly html
step_profile html
step_range html
step_ratio html
step_regex html
step_relevel html
step_relu html
step_rename html
step_rename_at html
step_rm html
step_rollimpute html
step_sample html
step_scale html
step_shuffle html
step_slice html
step_spatialsign html
step_sqrt html
step_string2factor html
step_unknown html
step_unorder html
step_upsample html
step_window html
step_zv html
summary.recipe html
terms_select html
tidy.recipe html
tunable.step html
update.step html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error : package ‘dplyr’ required by ‘recipes’ could not be found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/rigel/stats/users/gjw10/rpackages2/recipes’
* installing *source* package ‘doParallel’ ...
** package ‘doParallel’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package ‘doParallel’
finding HTML links ... done
doParallel-package html
registerDoParallel html
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error : package ‘foreach’ required by ‘doParallel’ could not be found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘<path to personal library>/doParallel’
ERROR: dependency ‘recipes’ is not available for package ‘caret’
* removing ‘<path to personal library>/caret’
The downloaded source packages are in
‘/tmp/Rtmpyd0cpT/downloaded_packages’
Warning messages:
1: In install.packages("doParallel", dependencies = T) :
installation of package ‘recipes’ had non-zero exit status
2: In install.packages("doParallel", dependencies = T) :
installation of package ‘doParallel’ had non-zero exit status
3: In install.packages("doParallel", dependencies = T) :
installation of package ‘caret’ had non-zero exit status