r - 由于 fortran 无法安装 R 包
问题描述
我正在尝试在 R 中安装这个包
install.packages('rmutil')
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c cutil.c -o cutil.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c dist.c -o dist.o
77 -fno-optimize-sibling-calls -fpic -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -c gettvc.f -o gettvc.o
/bin/bash: 77: command not found
make: *** [/usr/lib/R/etc/Makeconf:191: gettvc.o] Error 127
ERROR: compilation failed for package ‘rmutil’
* removing ‘/home/alessandro/R_libs/rmutil’
Warning in install.packages :
installation of package ‘rmutil’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpOZ5A2U/downloaded_packages’
我不明白的是,我的 ubuntu 上确实安装了 gfortran。
欢迎任何帮助
解决方案
好的,我似乎安装了 2 个版本的 R
/usr/bin/R
/usr/R
我摆脱了这两个并正确重新安装了R。
我也不得不删除这个
rm ~/.R/Makevars
该文件向 R 提供了有关 gfortran 位置的错误说明。我刚刚删除了它。
推荐阅读
- java - 这个片段在junit中的含义是什么?
- node.js - npm 5.8.0 不支持 Ubuntu 19.04 上的 Node.js v10.15.2
- python - 比较两个列表的函数出现越界错误
- php - SQL/PHP 中是否有一种快速的方法可以让所有用户拥有所有分支权限?
- python - 在python中建造*塔
- python - 如何在 GridSearchCV 中正确选择最佳模型 - sklearn 和 caret 都做错了
- git - Git 合并状态“已经是最新的”,提交在 master 但更改基本上在下一次提交时被覆盖
- swift - 为什么不建议将 UIImage 数据保存到 UserDefaults?
- php - 子文件夹 htaccess 的 RewriteRule
- c# - 如何在 Asp.Net Core 应用程序中配置 MassTransit Saga