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

news2024/10/7 4:23:11

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

  • 一、metaboanalystR 安装
    • 1.1 Bioconductor报错,无网络连接
    • 1.2 github520-修改hosts文件
  • 二、retip安装
    • 2.1 rJava包加载报错及安装
    • 2.2 安装Retip包
  • 三、从Bioconductor安装Rdisop报错及解决方式
  • 四、Bioconductor安装报错总结

一、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

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

1.2 github520-修改hosts文件

metaboanalystR
百度搜索github520
修改host文件

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

解决方法

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

以文本形式打开hosts 文件,图片中为笔者2023-11-8修改
在这里插入图片描述

– 复制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,
在这里插入图片描述
在这里插入图片描述

问题:未安装R包“crmn”,手动安装后,再本地安装“metaboanalystR”,安装成功。
在这里插入图片描述
在这里插入图片描述

二、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

在这里插入图片描述
在这里插入图片描述

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

根据以上链接,首先安装Java,并进行环境配置。
在这里插入图片描述

以上,加载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包

四、Bioconductor安装报错总结

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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1191343.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【MySQL数据库】| 索引以及背后的数据结构

🎗️ 主页:小夜时雨 🎗️ 专栏:MySQL数据库 🎗️ 如何优雅的活着,是我找寻的方向 目录 1. 基本知识2. 索引背后的数据结构总结 1. 基本知识 概念 索引是一种特殊的文件,包含着对数据表里所有…

3D模型格式转换工具HOOPS Exchange如何获取模型的特征树?

Tech Soft 3D致力于用无与伦比的技术推动创新,并很高兴为Oracle、SIEMENS、Hexagon Matrology和Stratasist,提供用最快、最准确的数据转换工具包获取CAD数据。 HOOPS Exchange允许开发团队轻松构建,通过单一接口将CAD数据转换为30多种文件格…

Docker - 安装常用服务

Docker - 安装常用服务 防火墙 对外开放访问,需要开放指定的端口提供对外访问 # 防火墙状态 systemctl status firewalld # 开启防火墙 systemctl start firewalld # 关闭防火墙 systemctl stop firewalld# 开放端口 firewall-cmd --zonepublic --add-port10002/…

【React入门实战】实现Todo代办

文章目录 效果功能-状态管理相关接口定义相关方法定义 UIinput输入框:回车添加todo标题列表列表项Main 总体代码 非常简单入门的react-todo练习,代码写的很小白。 效果 技术栈:react-typeScript 数据分为代办Todo和已办完Done,可…

C#,数值计算——函数计算,Dfridr的计算方法与源程序

1 文本格式 using System; namespace Legalsoft.Truffer { /// <summary> /// 通过Ridders的多项式外推方法返回函数func在点x处的导数。 /// 输入值h作为估计的初始步长&#xff1b;它不需要很小&#xff0c;而是应为x上的增量&#xff0c; /// 在此增…

springboot,spring框架返回204 status code的时候,会吞掉返回值

背景 发现有个有意思的现象&#xff0c;就是当你的接口返回204的 HTTP status code 的时候&#xff0c;会自动把 response body 吃掉&#xff0c;即使代码里是有返回的。例如 &#xff08;其实204本身就是NO_CONTENT的意思&#xff0c;不过我是真没想到真干掉了返回&#xff0…

Spring6学习笔记01

一、课程简介 Spring框架是一款极其优秀的轻量级开源框架&#xff0c;为了解决企业应用开发的复杂性而出现。Spring框架的用途不仅仅限于服务器端的开发&#xff0c;从简单性、可测试性和松耦合性角度而言&#xff0c;绝大部分Java应用都可以从Spring中受益。Spring框架凭借其…

Linux Hadoop平台伪分布式安装

Linux Hadoop 伪分布式安装 1. JDK2. Hadoop3. MysqlHive3.1 Mysql8安装3.2 Hive安装 4. Spark4.1 Maven安装4.2 Scala安装4.3 Spark编译并安装 5. Zookeeper6. HBase 版本概要&#xff1a; jdk&#xff1a; jdk-8u391-linux-x64.tar.gzhadoop&#xff1a;hadoop-3.3.1.tar.gzh…

JVM在线分析-解决问题的工具一(jinfo,jmap,jstack)

1. jinfo (base) PS C:\Users\zishi\Desktop> jinfo Usage:jinfo <option> <pid>(to connect to a running process)where <option> is one of:-flag <name> to print the value of the named VM flag #输出对应名称的参数-flag [|-]<n…

v-calendar 日历组件使用自定义提示内容

目录 0.介绍 1.安装v-calendar 2.页面使用 3.使用插槽实现待办数量的标记 0.介绍 最近项目中用到了日历插件&#xff0c;需要统计每天的任务数量&#xff0c;类似elementui的badge组件&#xff0c;待办任务数量 大概最后的效果如下图所示&#xff0c;右上角把代办任务数量…

php 二分查询算法实现

原理&#xff1a;二分查找算法&#xff08;Binary Search&#xff09;是一种针对有序数组的查找算法。它的原理是通过将查找区间逐渐缩小一半来快速定位要查找的目标值。 应用场景&#xff1a; 数据库或文件系统索引查找&#xff1a;在数据库或文件系统中&#xff0c;索引是有…

基于springboot 停车场管理系统-计算机毕设 附源码 39315

spring boot停车场管理系统的设计与实现 摘 要 科技进步的飞速发展引起人们日常生活的巨大变化&#xff0c;电子信息技术的飞速发展使得电子信息技术的各个领域的应用水平得到普及和应用。信息时代的到来已成为不可阻挡的时尚潮流&#xff0c;人类发展的历史正进入一个新时代。…

【C++数据结构】顺序存储结构的抽象实现

文章目录 前言一、目标二、SeqList实现要点三、SeqList函数实现3.1 get函数3.2 set函数3.3 insert函数带2个参数的insert带一个参数的insert 3.4 remove函数3.5 clear函数3.6 下标运算符重载函数无const版本const版本 3.7 length函数 总结 前言 当谈到C数据结构时&#xff0c;…

97 只出现一次的数字

只出现一次的数字 题解1 异或的应用&#xff08;判断出现次数是奇偶&#xff09; 给你一个 非空 整数数组 nums &#xff0c;除了某个元素只出现一次以外&#xff0c;其余每个元素均出现两次。找出那个只出现了一次的元素。 你必须设计并实现线性时间复杂度的算法来解决此问题…

PCIe寄存器之二

关键字索引&#xff1a; CAP_PM 对应&#xff1a;Capabilities: [c0] Power Management CAP_MSI 对应&#xff1a;Capabilities: [c8] MSI CAP_MSIX对应&#xff1a;Capabilities: [e0] MSI-X CAP_EXP 对应&#xff1a;Capabilities: [70] Express (v2) Endpoint 以上 [] 内的…

开设自己的网站系类03安装数据库(centos版)

编者买了一个服务器打算自己构建一个网站&#xff0c;用于记录生活。网站大概算是一个个人博客吧。记录创建过程的一些步骤。 前面已经讲过配置服务器的程序运行环境 网站运行还需要数据库&#xff0c;本篇文章则是安装数据库的内容。 卸载mariadb 查看是否有安装 mariadb&…

【Python】数据分析案例:世界杯数据可视化

文章目录 前期数据准备导入数据 分析&#xff1a;世界杯中各队赢得的比赛数分析&#xff1a;先打或后打的比赛获胜次数分析&#xff1a;世界杯中的抛硬币决策分析&#xff1a;2022年T20世界杯的最高得分者分析&#xff1a;世界杯比赛最佳球员奖分析&#xff1a;最适合先击球或追…

【C语言基础】近期所学到的函数以及关键字(函数memset、scanf、关键字staric、 inline、volatile)

&#x1f4e2;&#xff1a;如果你也对机器人、人工智能感兴趣&#xff0c;看来我们志同道合✨ &#x1f4e2;&#xff1a;不妨浏览一下我的博客主页【https://blog.csdn.net/weixin_51244852】 &#x1f4e2;&#xff1a;文章若有幸对你有帮助&#xff0c;可点赞 &#x1f44d;…

python核心编程速记【笔记迁移】

笔记速记 1.python非常注重缩进&#xff0c;这是它的显著特征之一。 2.import相当于头文件声明模块。 3.利用type函数 type(a)可以查看当前变量类型。 isinstance可以比较两个数据类型并返回一个布尔值。 4.这里面的可直接使用and和or作为一个函数 5.python的算法比较贴合…

如何改善食品饮料包装生产企业的OEE?

食品饮料这类商品在我们的日常生活中十分常见&#xff0c;它们存在于各类商店、超市或路边的小店里。而食品饮料的包装是吸引人们购买该产品的一个重要因素。为了在这个市场中脱颖而出并提高盈利能力&#xff0c;企业需要关注设备的综合效率&#xff0c;即OEE&#xff08;Overa…