簡體   English   中英

R中的“軟件包tuneR的安裝具有非零退出狀態”

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

操作系統:Ubuntu 18.04 R version:3.4.3 and 3.4.4

我嘗試在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

(我也用過RStudio)

您可以嘗試下載源代碼並從RStudio安裝。 tuneR可在以下位置獲得:

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

下載.tar.gz文件並在本地安裝。 您可以通過RStudio進行安裝(“軟件包”選項卡->從以下位置更改安裝:軟件包),也可以通過終端使用

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

另一種選擇是

> 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