You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法加载Tidyverse与Glimma包的问题求助

无法加载tidyverse和Glimma包的问题

问题重现

加载tidyverse包时失败,执行代码:

library(tidyverse)

错误信息

Error: package or namespace load failed for ‘tidyverse’ in namespaceExport(ns, exports):
 undefined exports: BROWSE, DELETE, GET, HEAD, PATCH, POST, PUT, RETRY, Token, Token1.0, Token2.0, TokenServiceAccount, VERB, accept, accept_json, accept_xml, add_headers, authenticate, build_url, cache_info, config, content, content_type, content_type_json, content_type_xml, cookies, curl_docs, get_callback, guess_media, handle, handle_find, handle_reset, has_content, headers, hmac_sha1, http_condition, http_date, http_error, http_status, http_type, httr_dr, httr_options, init_oauth1.0, init_oauth2.0, insensitive, message_for_status, modify_url, oauth1.0_token, oauth2.0_access_token, oauth2.0_authorize_url, oauth2.0_token, oauth_app, oauth_callback, oauth_endpoint, oauth_endpoints, oauth_exchanger, oauth_header, oauth_listener, oauth_service_token, oauth_signature, parse_http_date, parse_media, parse_url, parsed_content, progress, rerequest, reset_config, revoke_all, set_callback, set_config, set_
In addition: Warning messages:
1: package ‘tidyverse’ was built under R version 4.1.3 
2: S3 methods ‘$.insensitive’, ‘[.insensitive’, ‘[[.insensitive’, ‘as.character.form_file’, ‘as.character.response’, ‘as_field.default’, ‘as_field.logical’, ‘as_field.numeric’, ‘c.request’, ‘cookies.handle’, ‘cookies.response’, ‘headers.response’, ‘http_error.character’, ‘http_error.integer’, ‘http_error.response’, ‘print.cache_info’, ‘print.handle’, ‘print.oauth_app’, ‘print.oauth_endpoint’, ‘print.opts_list’, ‘print.request’, ‘print.response’, ‘status_code.numeric’, ‘status_code.response’ were declared in NAMESPACE but not found

R版本信息

执行sessionInfo()输出:

R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                       LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.1 tools_4.1.1 

已尝试的无效解决方案

  • 重新安装tidyverse并添加依赖:
remove.packages("tidyverse")
install.packages("tidyverse", dependencies = TRUE)
  • 下载安装RTools

可行解决方案

1. 升级R版本

错误提示显示tidyverse是基于R 4.1.3编译的,当前使用的R 4.1.1版本不兼容,会导致依赖包加载异常。建议将R升级到4.1.3或更高版本,之后重新安装tidyverse和Glimma。

2. 单独修复httr包

错误中的未定义导出函数均来自httr包(tidyverse的核心依赖),可能是httr安装损坏或版本不匹配。执行以下步骤修复:

# 卸载httr包
remove.packages("httr")
# 重新安装httr并确保依赖完整
install.packages("httr", dependencies = TRUE)
# 再次尝试加载tidyverse
library(tidyverse)

3. 检查安装权限

Windows系统用户需确保以管理员身份运行R/RStudio,避免安装包时因权限不足导致文件缺失。

内容的提问来源于stack exchange,提问作者Sabrina Fernando

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 23:05:25