簡體   English   中英

無法在Ubuntu 16.04中安裝R base

[英]Unable to Install R base in Ubuntu 16.04

我知道之前已經有人問過這個問題,但是我嘗試過的所有答案都沒有對我有用。 我需要安裝R,但每次嘗試此錯誤時都會出現:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-base : Depends: r-base-core (>= 3.4.1-2xenial0) but it is not going to be installed
          Depends: r-recommended (= 3.4.1-2xenial0) 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.

對於遇到的其他錯誤,我使用了ff並解決了它們:

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -

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

但是,第一個錯誤仍然顯示。 任何想法如何解決這個問題? 請。

@neilfws評論是唯一有用的東西 我跟隨他的鏈接 我使用了這個答案 (是迄今為止獲得最高評價的答案 )。

所以我做了

sudo apt-get install aptitude

sudo aptitude install r-base

這首先給了我一個接受的選項,但是仍然有一些懸而未決的依存關系,所以我拒絕了第一個建議,並接受了下一個“聽起來很合理”的建議。

     Keep the following packages at their current version:
1)     r-base [Not Installed]                             
2)     r-cran-foreign [Not Installed]                     
3)     r-recommended [Not Installed]                      

     Leave the following dependencies unresolved:         
4)     r-base-core recommends r-recommended               


Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Install the following packages:            
1)     r-cran-foreign [0.8.69-1xenial0 (xenial)]
Accept this solution? [Y/n/q/?] Y

我已經在此處記錄了整個重新安裝的過程。

背景

我在Ubuntu 16.04上安裝了R3.5,並按照此處介紹的各種資源安裝了XLSX軟件包后,我認為我對其他軟件包有問題(我錯了),這是我決定重新安裝的時間。 我從清除所有安裝開始,但還不夠,而且出現了與OP類似的錯誤。

暫無
暫無

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

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