R 報錯:package ‘***’ is not available (for R version ****) 的解決方案


 

 

R 安裝sparklyr,ggplot2等包出現如下warning

package ‘****’ is not available (for R version 3.0.2)

系統環境 ubuntu14.04

 

上述問題糾結了我很久,嘗試過自己安裝packages.zip包,出現了版本不對的報錯

this R is version 3.0.2, package 'ggplot2' requires R >= 3.1

於是考慮到升級系統,猜測可能是底層依賴以及R的版本過低,於是運行如下命令在我的電腦里生效了,大家如果遇到可以用此方法試下

sudo add-apt-repository ppa:marutter/rrutter

sudo apt-get update

sudo apt-get upgrade

如果出現如下錯誤:

Fetched 30.0 MB in 50min 49s (9,832 B/s)                                       
E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/b/boot/r-cran-boot_1.3-17-1trusty0_all.deb  Connection failed

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/s/survival/r-cran-survival_2.40-1-1~ubuntu14.04.1~ppa1_amd64.deb  Connection failed

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/rpart/r-cran-rpart_4.1-10-1trusty0_amd64.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/r-cran-class/r-cran-class_7.3-14-1trusty0_amd64.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/r-cran-nnet/r-cran-nnet_7.3-12-1trusty0_amd64.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/r-cran-spatial/r-cran-spatial_7.3-10-1trusty0_amd64.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/c/codetools/r-cran-codetools_0.2-15-1cran1trusty0_all.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/r-base/r-base_3.3.2-1trusty0_all.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/r-base/r-recommended_3.3.2-1trusty0_all.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/r-base/r-doc-html_3.3.2-1trusty0_all.deb  Size mismatch

E: Failed to fetch http://ppa.launchpad.net/marutter/rrutter/ubuntu/pool/main/r/r-base/r-base-html_3.3.2-1trusty0_all.deb  Size mismatch

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

運行如下命令:sudo apt-get upgrade --fix-missing

 

R語言的報錯比較粗糙,有些時候只是說not available,但並沒有告訴你到底哪里不匹配,這里應該算是個小bug,但Mac-OS以及win目前還沒遇到過


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM