簡體   English   中英

無法安裝R包:“ clusterExperiment”

[英]failing to install R package: “clusterExperiment”

我目前在Rstudio中安裝軟件包時遇到一些問題。 我認為我的代碼是正確的,但是使用兩種方法多次失敗。 結果已粘貼到此處。

命令:

library(devtools)
install_github("epurdom/clusterExperiment")

第一個結果是從github安裝。

ld: warning: directory not found for option '
L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [clusterExperiment.so] Error 1
ERROR: compilation failed for package ‘clusterExperiment’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/clusterExperiment’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/clusterExperiment’
Installation failed: Command failed (1)

命令:

source("https://bioconductor.org/biocLite.R")
biocLite("clusterExperiment")

第二個是從Bioconductor安裝。

BioC_mirror: https://bioconductor.org
Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.1 (2018-07-02).
Installing package(s) ‘clusterExperiment’
試開URL’https://bioconductor.org/packages/3.7/bioc/bin/macosx/el-capitan/contrib/3.5/clusterExperiment_2.0.2.tgz'
Content type 'application/x-gzip' length 11318597 bytes (10.8 MB)
==================================================
downloaded 10.8 MB

The downloaded binary packages are in
/var/folders/rw/m1prpj417277f5fzdbwdxwwh0000gn/T//RtmpCkjRZv/downloaded_packages
Old packages: 'ape'
Update all/some/none? [a/s/n]: 
a

There is a binary version available but the source version is later:
binary source needs_compilation
ape    5.1    5.2              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘ape’

## Skip some progress here ##

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ape.so] Error 1
ERROR: compilation failed for package ‘ape’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ape’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ape’

The downloaded source packages are in
‘/private/var/folders/rw/m1prpj417277f5fzdbwdxwwh0000gn/T/RtmpCkjRZv/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
installation of package ‘ape’ had non-zero exit status

有人知道發生了什么嗎?

然后我安裝了自制軟件,然后安裝了gcc,然后安裝了gfortran(OS X Lion(10.7):下載gfortran 4.8.2)盡管該軟件包似乎已成功安裝,但是當我將其裝入庫時,它無法正常工作。 Rstudio告訴您:

package or namespace load failed for ‘clusterExperiment’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): 
package named ‘robustbase’ doesn't exist.

所以我安裝了robustbase包,然后在庫后收到一些警告

> library(clusterExperiment)
Warning: namespace ‘data.table’ is not available and has been replaced
by .GlobalEnv when processing object ‘slm’
Warning: namespace ‘data.table’ is not available and has been replaced
by .GlobalEnv when processing object ‘slm’
Warning: namespace ‘bigmemory’ is not available and has been replaced
by .GlobalEnv when processing object ‘slm’
Warning: namespace ‘bigmemory’ is not available and has been replaced
by .GlobalEnv when processing object ‘slm’

我希望這無關緊要。

以下是我所有的代碼:

source("https://bioconductor.org/biocLite.R")
biocLite("clusterExperiment")

library(clusterExperiment)

install.packages("devtools")
library(devtools)

# install_github("epurdom/clusterExperiment")

source("https://bioconductor.org/biocLite.R")
biocLite("SingleCellExperiment")

install_github("drisso/fletcher2017data")

library(fletcher2017data)
library(SingleCellExperiment)

看起來您沒有安裝gfortran,請使用自制軟件安裝gcc,這將為您提供Fortran。


現在,您需要install.packages("robustbase")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM