2017-06-23 68 views
0

安裝`mclust`包當我想安裝的軟件包mclust,我得到以下錯誤:失敗的R中的Windows 10

> install.packages("mclust") 
Installing package into ‘C:/Users/hp1/Documents/R/win-library/3.2’ 
(as ‘lib’ is unspecified) 

    There is a binary version available but the source version is 
    later: 
     binary source needs_compilation 
mclust 5.2.3 5.3    TRUE 

Do you want to install from sources the package which needs compilation? 
y/n: y 
installing the source package ‘mclust’ 

trying URL 'https://cran.rstudio.com/src/contrib/mclust_5.3.tar.gz' 
Content type 'application/x-gzip' length 2792962 bytes (2.7 MB) 
downloaded 2.7 MB 

* installing *source* package 'mclust' ... 
** package 'mclust' successfully unpacked and MD5 sums checked 
** libs 

*** arch - i386 
gcc -m32 -I"C:/PROGRA~1/R/R-32~1.3/include" -DNDEBUG  -I"d:/RCompile/r-compiling/local/local323/include"  -O3 -Wall -std=gnu99 -mtune=core2 -c init.c -o init.o 
gfortran -m32  -O3 -mtune=core2 -c mclust.f -o mclust.o 
make: gfortran: Command not found 
C:/PROGRA~1/R/R-32~1.3/etc/i386/Makeconf:206: recipe for target 'mclust.o' failed 
make: *** [mclust.o] Error 127 
Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-32~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.3/share/make/winshlib.mk" SHLIB="mclust.dll" SHLIB_LIBADD='$(FLIBS)' OBJECTS="init.o mclust.o mclustaddson.o"' had status 2 
ERROR: compilation failed for package 'mclust' 
* removing 'C:/Users/hp1/Documents/R/win-library/3.2/mclust' 
Warning in install.packages : 
    running command '"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\hp1\Documents\R\win-library\3.2" C:\Users\hp1\AppData\Local\Temp\RtmpiAzB7h/downloaded_packages/mclust_5.3.tar.gz' had status 1 
Warning in install.packages : 
    installation of package ‘mclust’ had non-zero exit status 

The downloaded source packages are in 
    ‘C:\Users\hp1\AppData\Local\Temp\RtmpiAzB7h\downloaded_packages’ 

當挖了關於如何解決它的解決方案,我碰到this所述OP說,在這個問題產生了由於缺少llpacklblas庫,這是他們的固定通過安裝lapackdevblasdev包註釋。但是當我嘗試安裝這些軟件包時,出現錯誤。我檢查了我所有的12個知識庫並重試,但結果相同。

> install.packages("lapackdev") 
Installing package into ‘C:/Users/hp1/Documents/R/win-library/3.2’ 
(as ‘lib’ is unspecified) 
Warning in install.packages : 
    package ‘lapackdev’ is not available (for R version 3.2.3) 
> setRepositories(graphics = getOption("menu.graphics"), 
+     ind = NULL, addURLs = character()) 
--- Please select repositories for use in this session --- 


1: + CRAN     2: BioC software  
3: BioC annotation  4: BioC experiment  
5: BioC extra    6: + CRAN (extras)  
7: Omegahat    8: R-Forge    
9: rforge.net   10: CRAN (extras, https) 
11: R-Forge [https]  12: rforge.net [https] 

Enter one or more numbers separated by spaces, or an empty line to cancel 
1: 1 2 3 4 5 6 7 8 9 10 11 12 
> install.packages("lapackdev") 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.omegahat.org/R/src/contrib: 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES.gz': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    unable to access index for repository https://R-Forge.R-project.org/src/contrib: 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES' 
Installing package into ‘C:/Users/hp1/Documents/R/win-library/3.2’ 
(as ‘lib’ is unspecified) 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.omegahat.org/R/src/contrib: 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES.gz': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    unable to access index for repository https://R-Forge.R-project.org/src/contrib: 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES' 
Warning in install.packages : 
    package ‘lapackdev’ is not available (for R version 3.2.3) 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.omegahat.org/R/bin/windows/contrib/3.2: 
    cannot open URL 'http://www.omegahat.org/R/bin/windows/contrib/3.2/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'http://www.rforge.net/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.rforge.net/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.rforge.net/bin/windows/contrib/3.2: 
    cannot open URL 'http://www.rforge.net/bin/windows/contrib/3.2/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/bin/windows/contrib/3.2/PACKAGES': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    unable to access index for repository https://R-Forge.R-project.org/bin/windows/contrib/3.2: 
    cannot open URL 'https://R-Forge.R-project.org/bin/windows/contrib/3.2/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://www.rforge.net/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'https://www.rforge.net/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository https://www.rforge.net/bin/windows/contrib/3.2: 
    cannot open URL 'https://www.rforge.net/bin/windows/contrib/3.2/PACKAGES' 

同樣的,blasdev

> install.packages("blasdev") 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.omegahat.org/R/src/contrib: 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES.gz': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    unable to access index for repository https://R-Forge.R-project.org/src/contrib: 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES' 
Installing package into ‘C:/Users/hp1/Documents/R/win-library/3.2’ 
(as ‘lib’ is unspecified) 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.omegahat.org/R/src/contrib: 
    cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES.gz': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    unable to access index for repository https://R-Forge.R-project.org/src/contrib: 
    cannot open URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES' 
Warning in install.packages : 
    package ‘blasdev’ is not available (for R version 3.2.3) 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.omegahat.org/R/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.omegahat.org/R/bin/windows/contrib/3.2: 
    cannot open URL 'http://www.omegahat.org/R/bin/windows/contrib/3.2/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'http://www.rforge.net/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'http://www.rforge.net/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository http://www.rforge.net/bin/windows/contrib/3.2: 
    cannot open URL 'http://www.rforge.net/bin/windows/contrib/3.2/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    cannot open URL 'https://R-Forge.R-project.org/bin/windows/contrib/3.2/PACKAGES': HTTP status was '400 Bad Request' 
Warning in install.packages : 
    unable to access index for repository https://R-Forge.R-project.org/bin/windows/contrib/3.2: 
    cannot open URL 'https://R-Forge.R-project.org/bin/windows/contrib/3.2/PACKAGES' 
Warning in install.packages : 
    cannot open URL 'https://www.rforge.net/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found' 
Warning in install.packages : 
    cannot open URL 'https://www.rforge.net/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found' 
Warning in install.packages : 
    unable to access index for repository https://www.rforge.net/bin/windows/contrib/3.2: 
    cannot open URL 'https://www.rforge.net/bin/windows/contrib/3.2/PACKAGES' 

這是怎麼回事?如何讓mclust安裝?

+0

試試這個:https://sites.google.com/site/jivsoft/Home/r-blas-interface –

回答

0

我回答我的問題,如下解決問題(即mclust已成功安裝),而不需要安裝2個包我的問題提了。所以,這可能會幫助有困難的人安裝mclust

我(在寫這個答案的時間1.0.143)更新[R版本從3.25到3.4,和R Studio版本從0.9到最新的,這似乎已經解決了這個問題。