R | R包安装报错-github连接速度慢或无法访问 | metaboanalystR | Retip | rJava安装

这篇具有很好参考价值的文章主要介绍了R | R包安装报错-github连接速度慢或无法访问 | metaboanalystR | Retip | rJava安装。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

一、metaboanalystR 安装

Error: Bioconductor version cannot be validated; no internet connection?-2019-06-19
BiocManager安装R包失败——Bioconductor version cannot be validated
Windows电脑使用Rstudio会有多少错误呢

1.1 Bioconductor报错,无网络连接

报错问题:

Error: Bioconductor version cannot be validated; no internet connection?  See #troubleshooting section in vignette
pacman::p_load(c("impute", "pcaMethods", "globaltest", "GlobalAncova", "Rgraphviz", "preprocessCore", "genefilter", "sva", "limma", "KEGGgraph", "siggenes","BiocParallel", "MSnbase", "multtest","RBGL","edgeR","fgsea","httr","qs"))
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
Warning: 无法在貯藏處http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/4.3中读写索引:
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/4.3/PACKAGES'
trying URL 'https://bioconductor.org/packages/3.17/bioc/bin/windows/contrib/4.3/BiocVersion_3.17.1.zip'
Content type 'application/zip' length 8264 bytes
downloaded 8264 bytes

metaboanalystr github,r语言,github,开发语言
metaboanalystr github,r语言,github,开发语言

metaboanalystr github,r语言,github,开发语言

metaboanalystr github,r语言,github,开发语言
metaboanalystr github,r语言,github,开发语言

1.2 github520-修改hosts文件

metaboanalystR
百度搜索github520
修改host文件

安装metaboanalystR,首先需要手动安装依赖包SSPA,但安装不成功。

解决方法

找到系统中的hosts 文件
Windows 系统:C:\Windows\System32\drivers\etc\hosts

以文本形式打开hosts 文件,图片中为笔者2023-11-8修改
metaboanalystr github,r语言,github,开发语言

– 复制Github520信息,并粘贴在上述打开的hosts文件中,保存。

  • 由于是在系统路径下,无法直接保存该文件,可将其先另存到桌面,再从桌面拖到C:\Windows\System32\drivers\etc\hosts路径下,接下来重启RStudio即可正常访问github并下载安装R包了;
  • 该文件内容可能需要定期更新,不能访问github时就可以重复以上操作。
> devtools::install_github("https://github.com/mvaniterson/SSPA")
Downloading GitHub repo mvaniterson/SSPA@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                          
2: CRAN packages only           
3: None                         
4: vctrs (0.6.3 -> 0.6.4) [CRAN]
5: fansi (1.0.4 -> 1.0.5) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
vctrs  (0.6.3 -> 0.6.4 ) [CRAN]
fansi  (1.0.4 -> 1.0.5 ) [CRAN]
qvalue (NA    -> 2.32.0) [CRAN]
Installing 3 packages: vctrs, fansi, qvalue
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
trying URL 'https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/vctrs_0.6.4.zip'
Content type 'application/zip' length 1334820 bytes (1.3 MB)
downloaded 1.3 MB

trying URL 'https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/fansi_1.0.5.zip'
Content type 'application/zip' length 314105 bytes (306 KB)
downloaded 306 KB

trying URL 'https://bioconductor.org/packages/3.17/bioc/bin/windows/contrib/4.3/qvalue_2.32.0.zip'
Content type 'application/zip' length 2809146 bytes (2.7 MB)
downloaded 2.7 MB

程序包‘vctrs’打开成功,MD5和检查也通过
Warning: 无法将拆除原来安装的程序包‘vctrs’
Warning: 回复了‘vctrs’
程序包‘fansi’打开成功,MD5和检查也通过
程序包‘qvalue’打开成功,MD5和检查也通过

下载的二进制程序包在
	C:\Users\hp\AppData\Local\Temp\RtmpCAEEVQ\downloaded_packages里
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\hp\AppData\Local\Temp\RtmpCAEEVQ\remotes52045d417c\mvaniterson-SSPA-6846d55/DESCRIPTION'
─  preparing 'SSPA':
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a 'data/datalist' file should be added
─  building 'SSPA_2.11.0.tar.gz'
   
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
* installing *source* package 'SSPA' ...
** using staged installation
** libs
using C compiler: 'gcc.exe (GCC) 12.3.0'
gcc  -I"D:/Program Files/R/R-4.3.1/include" -DNDEBUG     -I"D:/Apps install/Rtools/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c Rinit.c -o Rinit.o
Rinit.c:8:40: warning: missing braces around initializer [-Wmissing-braces]
    8 | static const R_CMethodDef cMethods[] = {
      |                                        ^
gcc  -I"D:/Program Files/R/R-4.3.1/include" -DNDEBUG     -I"D:/Apps install/Rtools/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c massdist.c -o massdist.o
gcc  -I"D:/Program Files/R/R-4.3.1/include" -DNDEBUG     -I"D:/Apps install/Rtools/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c nncg.c -o nncg.o
nncg.c: In function 'objf':
nncg.c:57:11: warning: '*c[0]' may be used uninitialized [-Wmaybe-uninitialized]
   57 |   return(c[0]);
      |         ~~^~~~
gcc -shared -s -static-libgcc -o SSPA.dll tmp.def Rinit.o massdist.o nncg.o -LD:/Apps install/Rtools/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LD:/Apps install/Rtools/rtools43/x86_64-w64-mingw32.static.posix/lib -LD:/Program Files/R/R-4.3.1/bin/x64 -lR
installing to C:/Users/hp/AppData/Local/R/win-library/4.3/00LOCK-SSPA/00new/SSPA/libs/x64
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** 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 (SSPA)
Warning message:
In file.copy(savedcopy, lib, recursive = TRUE) :
  problem copying C:\Users\hp\AppData\Local\R\win-library\4.3\00LOCK\vctrs\libs\x64\vctrs.dll to C:\Users\hp\AppData\Local\R\win-library\4.3\vctrs\libs\x64\vctrs.dll: Permission denied

metaboanalystr github,r语言,github,开发语言

metaboanalystr github,r语言,github,开发语言
安装metaboanalystR,
metaboanalystr github,r语言,github,开发语言
metaboanalystr github,r语言,github,开发语言

问题:未安装R包“crmn”,手动安装后,再本地安装“metaboanalystR”,安装成功。
metaboanalystr github,r语言,github,开发语言
metaboanalystr github,r语言,github,开发语言

二、retip安装

R语言rJava包安装载入及JAVA环境配置
R:xlsx/rJava无法加载的解决方法——java安装及版本查询

2.1 rJava包加载报错及安装

> devtools::install_github("https://github.com/PaoloBnn/Retip")
Downloading GitHub repo PaoloBnn/Retip@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                          
2: CRAN packages only           
3: None                         
4: vctrs (0.6.3 -> 0.6.4) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
vctrs (0.6.3 -> 0.6.4) [CRAN]
Installing 1 packages: vctrs
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
trying URL 'https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/vctrs_0.6.4.zip'
Content type 'application/zip' length 1334820 bytes (1.3 MB)
downloaded 1.3 MB

程序包‘vctrs’打开成功,MD5和检查也通过
Warning: 无法将拆除原来安装的程序包‘vctrs’
Warning: 回复了‘vctrs’

下载的二进制程序包在
	C:\Users\hp\AppData\Local\Temp\Rtmp0WG2OO\downloaded_packages里
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\hp\AppData\Local\Temp\Rtmp0WG2OO\remotes47e451515493\PaoloBnn-Retip-8c23eda/DESCRIPTION' ...
─  preparing 'Retip':
✔  checking DESCRIPTION meta-information ... 
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building 'Retip_0.5.4.tar.gz'
   
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
* installing *source* package 'Retip' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'rJava', details:
  call: fun(libname, pkgname)
  error: JAVA_HOME cannot be determined from the Registry
Execution halted
ERROR: lazy loading failed for package 'Retip'
* removing 'C:/Users/hp/AppData/Local/R/win-library/4.3/Retip'
Warning messages:
1: In file.copy(savedcopy, lib, recursive = TRUE) :
  problem copying C:\Users\hp\AppData\Local\R\win-library\4.3\00LOCK\vctrs\libs\x64\vctrs.dll to C:\Users\hp\AppData\Local\R\win-library\4.3\vctrs\libs\x64\vctrs.dll: Permission denied
2: In i.p(...) :
  安装程序包‘C:/Users/hp/AppData/Local/Temp/Rtmp0WG2OO/file47e461ac715c/Retip_0.5.4.tar.gz’时退出狀態的值不是0
> install.packages("rJava")
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
trying URL 'https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/rJava_1.0-6.zip'
Content type 'application/zip' length 1300490 bytes (1.2 MB)
downloaded 1.2 MB

程序包‘rJava’打开成功,MD5和检查也通过

下载的二进制程序包在
	C:\Users\hp\AppData\Local\Temp\Rtmp0WG2OO\downloaded_packages里
> library(rJava)
Error: package or namespace load failed for ‘rJava’:
 loadNamespace()里算'rJava'时.onLoad失败了,详细内容:
  调用: fun(libname, pkgname)
  错误: JAVA_HOME cannot be determined from the Registry

metaboanalystr github,r语言,github,开发语言
metaboanalystr github,r语言,github,开发语言

Windows10下的超详细Java安装步骤
Java/JDK下载安装与环境配置(Windows 10 超详细的图文版教程 )

根据以上链接,首先安装Java,并进行环境配置。
metaboanalystr github,r语言,github,开发语言

以上,加载rJava包成功。

2.2 安装Retip包

> devtools::install_github("https://github.com/PaoloBnn/Retip")
Downloading GitHub repo PaoloBnn/Retip@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                          
2: CRAN packages only           
3: None                         
4: vctrs (0.6.3 -> 0.6.4) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
vctrs (0.6.3 -> 0.6.4) [CRAN]
Installing 1 packages: vctrs
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
trying URL 'https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/vctrs_0.6.4.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/vctrs_0.6.4.zip'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
  URL 'https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/vctrs_0.6.4.zip': status was 'Couldn't resolve host name'
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  下载程序包‘vctrs’时出了问题
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\hp\AppData\Local\Temp\Rtmp0WG2OO\remotes47e4440c7b54\PaoloBnn-Retip-8c23eda/DESCRIPTION' (793ms)
─  preparing 'Retip':
✔  checking DESCRIPTION meta-information ... 
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building 'Retip_0.5.4.tar.gz'
   
将程序包安装入‘C:/Users/hp/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
* installing *source* package 'Retip' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** 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 (Retip)

安装成功。

三、从Bioconductor安装Rdisop报错及解决方式

从Bioconductor安装R包报错,网络未连接:

>if (!require("BiocManager", quietly = TRUE))
  install.packages("BiocManager")

BiocManager::install("Rdisop")

Error: Bioconductor version cannot be validated; no internet connection? See #troubleshooting section in vignette
>options(download.file.method = 'libcurl')  #问题解决

>if (!require("BiocManager", quietly = TRUE))
  install.packages("BiocManager")

BiocManager::install("Rdisop")

BiocManager无法安装R包文章来源地址https://www.toymoban.com/news/detail-761666.html

四、Bioconductor安装报错总结

  • 重启软件及电脑
  • 修改host文件
  • 安装java

到了这里,关于R | R包安装报错-github连接速度慢或无法访问 | metaboanalystR | Retip | rJava安装的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 访问gitbub报错:fatal: 无法访问 ‘https://github.com/xxxxx.git/‘:Unsupported proxy syntax in ‘your_proxy_serve

    使用git clone进行下载,出现如下错误: 解决方案: 1.查看github配置 2.使用如下命令,删除上来两条 删除成功后,即可正常clone了(还访问不了就是网络的问题了)

    2024年02月03日
    浏览(40)
  • 解决 GitHub 访问速度慢的问题

    GitHub 访问速度慢的问题 GitHub 项目中的图片显示不出的问题 点击获取 文件 用记事本打开文件 将文件中的内容复制,粘贴到本机的 hosts 文件中 Windows 系统的 hosts 文件在 C:WindowsSystem32driversetc 文件夹下 保存对本机 hosts 的修改 如果未生效,打开 Windows 的 CMD 窗口,输入 ip

    2024年02月15日
    浏览(43)
  • 【效率提升】提升Github访问速度的办法

    2.1 安装油猴插件和脚本 TamperMonkey油猴脚本插件是一个脚本管理器,其自身并不提供脚本,所以我们需要额外的安装脚本。 2.1.1. 下载油猴插件 官方地址:https://github.com/Tampermonkey/tampermonkey 如果没有被墙:https://chrome.google.com/webstore/detail/dhdgffkkebhmkfjojejmpbldmpobfkfo 网盘下载:h

    2024年02月10日
    浏览(39)
  • 【教程】idea中github copliot插件无法登录连接,报错Sign in failed.Reason:RequestsignInlnitiate failed with message.

    前言:github copliot是一个强大的人工智能编程助手。它基于GPT-3.5模型,可以在编写代码时提供智能的自动完成和代码建议。 Sign in failed.Reason:RequestsignInlnitiate failed with message:connect ETIMEDOUT20.205.243.166:443,requestid:5,error code:-32603 Sign in failed.Reason:RequestsignInlnitiate failed with message:con

    2024年03月14日
    浏览(43)
  • windows安装OpenVPN后可连接VPN但无法访问网络

    环境 windows11,openvpn3.x 流程说明 安装及正确配置openvpn后,可正常连接vpn,但系统无法访问网络,浏览器和软件的网络行为全部被限制,而且此时并未配置防火墙规则,问题确定出在openvpn的配置上。 通用配置如下: 此时无法访问普通网络,因为当前全部网络请求都被导向了

    2024年02月08日
    浏览(44)
  • 使用cdn提高Github Pages的访问速度

    众所周知,Github Pages是部署在国外服务器上的,因此从国外访问速度还可以,但是国内访问速度较慢,所以主要是优化国内访问这方面。在有限资源的情况下,优化网站访问速度的常用方式有两种,一种是网页懒加载,动态加载技术,这种方法的思路是在加载网页时,先生成

    2024年02月03日
    浏览(97)
  • 解决Github copilot访问速度慢、资源加载问题

    github 是全世界最流行的开源项目托管平台,其代表的开源文化从根本上改变了软件开发的方式。 基本上所有的需求都能从 github 上或多或少找到现成的实现方案,再也不用重头开始造轮子而是自定义轮子! 然而,有时候国内访问 GitHub 速度太慢,如何加速访问 github.com 网站就

    2024年02月07日
    浏览(45)
  • 修改hosts文件,提高访问github的速度(github外网的登录问题)

    修改hosts文件,提高访问github的速度 1,查询github的ip(网址ip、域名、静态ip) ● github的网址ip查询:网站:GitHub.com - GitHub: Let\\\'s build from here · GitHub ● github域名查询:网站:在Fastly.net - The edge cloud platform behind the best of the web | Fastly ● github静态ip查询:网站:https://github.com

    2024年02月06日
    浏览(43)
  • 使用GitHub当博客图床提升博客访问速度

    作为一个穷逼来说站长来说,只有一个1M宽带这样的小水管服务器,如果博客稍微放一点图片到本地,然后人多点访问网站基本就很卡了,但又不想去吧图片放到图床里然后复制链接到文章里面那么麻烦 如何解决这个问题呢?网上浏览了一下发现有很多插件我最后选择了[Gi

    2024年02月03日
    浏览(39)
  • 机器环境无法访问GitHub情况下linux安装OpenCV执行cmake无法下载ADE文件v0.1.1f.zip

    ☞ ░ 前往老猿Python博客 ░ https://blog.csdn.net/LaoYuanPython 在CSDN的博文《构建VisualStudio2019+OpenCV4.3的C++ windows编译环境》中,老猿介绍了opencv版本的下载方法的方法,该方法下载OpenCV的代码不要上GitHub,国内可以直接访问,比较方便。 在linux安装OpenCV与上面博文不同的是版本选择

    2024年02月03日
    浏览(47)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包