无法在R中手动安装包

aiqt4smr  于 2023-11-14  发布在  其他
关注(0)|答案(2)|浏览(123)

我正在尝试安装软件包使用:

library(devtools)
install_github("s-conner/rmtl/rpackage")

字符串
但是,我得到了一个错误:
错误:无法从GitHub安装'RMTL':
schannel:无法接收握手,SSL/TLS连接失败
有什么建议吗?

zzzyeukh

zzzyeukh1#

它对我来说安装得很好(在Linux上)。正如输出所示,我也有一个GSTUUB_PAT,但我认为公共存储库不需要它。

$ installGithub.r s-conner/rmtl/rpackage
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo s-conner/rmtl@HEAD
── R CMD build ────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/remotes16a2746ead7197/s-conner-rmtl-c2fb188/rpackage/DESCRIPTION’ ...
─  preparing ‘rmtl’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘rmtl_0.0.0.9000.tar.gz’
   
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘rmtl’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rmtl)
$

字符串
(其中installGithub.r是我的littler CRAN包中remotes::install_github的一个简单方便的 Package 器。)
所以我想你需要弄清楚为什么到GitHub的https握手会失败。看起来GitHub很好地为仓库服务。

kmbjn2e3

kmbjn2e32#

你也可以在代码的开头找到包中的3个函数

devtools::source_url("https://raw.githubusercontent.com/s-conner/rmtl/master/rpackage/R/cif.R")
devtools::source_url("https://raw.githubusercontent.com/s-conner/rmtl/master/rpackage/R/rmtl.R")
devtools::source_url("https://raw.githubusercontent.com/s-conner/rmtl/master/rpackage/R/rmtl_mod.R")

字符串
您还可以下载3r脚本文件和源代码

source("path/to/rmtl.R")

相关问题