ubuntu下升級R版本


ubuntu下升級R版本

 

在測試《機器學習 實用案例解析》一書的郵件分類代碼時,windows系統下rstudio中無法讀取特殊字符,在ubuntu下可以。在ubuntu虛擬機下安裝tm包(install.packages("tm"))時,提示R版本過低(需要3.1,但是只有3.0,最新版本是3.2),百度了下,網上的資料說,需要配置下/etc/apt/sources.list文件,即下載列表,包括R官方網站給出的方法也是如此。這些資料和R官網的說明地址如下:

http://blog.fens.me/r-install-ubuntu/

http://my.oschina.net/explore/blog/102481

https://cran.r-project.org/

但是按照上面的說明嘗試,卻遇到錯誤:

The following packages have unmet dependencies: r-base : Depends: r-base-core (>= 3.2.2-1quantal0) but it is not going to be installed Depends: r-recommended (= 3.2.2-1quantal0) but it is not going to be installed Recommends: r-base-html but it is not going to be installed E: Unable to correct problems, you have held broken packages.

 

以“ubuntu 升級r版本”為關鍵字百度,始終沒有找到解決辦法。

以“ubuntu 更新r版本 the following packages have unmet dependencies r-base-core”為關鍵字搜索,找到stackoverflow上面的一個帖子(http://stackoverflow.com/questions/15260250/re-installing-r-linux-ubuntu-unmet-dependencies-r),其中提到的解決方法是:

Try this

If you have added a line from new ubuntu repository to /etc/apt/sources.list, erase the line. Then, run the commands

sudo add-apt-repository ppa:marutter/rrutter 
sudo apt-get update 
sudo apt-get upgrade

It worked for me, the answer comes from here http://r.789695.n4.nabble.com/Upgrading-on-Ubuntu-from-2-11-1-to-2-15-1-td4636965.html

 

問題解決,R版本升級到3.2.2,安裝tmggplot2包成功。


免責聲明!

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



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