简体   繁体   English

R中的“软件包tuneR的安装具有非零退出状态”

[英]“installation of package tuneR had non-zero exit status” in R

OS: Ubuntu 18.04 R version: 3.4.3 and 3.4.4 操作系统:Ubuntu 18.04 R version:3.4.3 and 3.4.4

I tried to install tuneR with install.packages("tuneR") in R 3.4.3 and R 3.4.4 but I get this error: 我尝试在R 3.4.3和R 3.4.4中使用install.packages(“ tuneR”)安装tuneR,但出现此错误:

* installing *source* package ‘signal’ ...
 package ‘signal’ successfully unpacked and MD5 sums checked
 libs
gfortran   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong  -c dpchim.f -o dpchim.o
/bin/bash: gfortran: command not found
/usr/lib/R/etc/Makeconf:182: recipe for target 'dpchim.o' failed
make: *** [dpchim.o] Error 127
ERROR: compilation failed for package ‘signal’
* removing ‘/home/helias/R/x86_64-pc-linux-gnu-library/3.4/signal’
ERROR: dependency ‘signal’ is not available for package ‘tuneR’
* removing ‘/home/helias/R/x86_64-pc-linux-gnu-library/3.4/tuneR’
The downloaded source packages are in
    ‘/tmp/RtmpL1f4HR/downloaded_packages’
Warning messages:
1: In install.packages("tuneR") :
  installation of package ‘signal’ had non-zero exit status
2: In install.packages("tuneR") :
  installation of package ‘tuneR’ had non-zero exit status

(I also used RStudio) (我也用过RStudio)

You can try downloading the source and install from RStudio. 您可以尝试下载源代码并从RStudio安装。 tuneR is available at: tuneR可在以下位置获得:

https://CRAN.R-project.org/package=tuneR https://CRAN.R-project.org/package=tuneR

Download the .tar.gz file and install locally. 下载.tar.gz文件并在本地安装。 You can install using through RStudio (Packages tab -> change install from: Package), or you can install through the terminal using 您可以通过RStudio进行安装(“软件包”选项卡->从以下位置更改安装:软件包),也可以通过终端使用

R CMD INSTALL -l /path tuneR.tar.gz

Another option is 另一种选择是

> library(devtools)
> install_github("cran/tuneR")

我解决了安装gfortran的问题,然后重新运行install.packages(“ tuneR”)

sudo apt install gfortran

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM