Rをv4にアップデートするためにv3をアンインストールしましたが、今はインストールできません。

Rをv4にアップデートするためにv3をアンインストールしましたが、今はインストールできません。

Rバージョン3があります。まずv4をインストールする必要があります。 Rアップデートを試しましたが、成功しませんでした。 〜のようにこの投稿Rパッケージを削除するようアドバイスを受けました。出力されたフォルダを削除しようとすると、そのR -e '.libPaths()フォルダがないと出てきます。その後、R公式ホームページの方法に従ってR v4をインストールしてみました。

sudo apt update -qq
sudo apt install --no-install-recommends software-properties-common dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt install --no-install-recommends r-base

それは私に次のような結果を与えます:今何をすべきかわかりません。助けてもらえますか? Ubuntu 16を使用しています

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 (>= 4.1.0-1.2004.0) but it is not going to be installed
          Depends: r-recommended (= 4.1.0-1.2004.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

ベストアンサー1

問題の概要

  • ユーザーは、オペレーティングシステムのバージョンが「Ubuntu 16」だと思います。
  • lsb_release -csbionicUbuntu 18.04に戻る
  • インストールしようとしたときにr-baseUbuntu 20.04(focal)リポジトリが存在するかどうかを尋ねるメッセージを表示する

コメント/チャットでは、根本的な問題は、次のR関連の配信を含む、ユーザーフィードのさまざまな展開が混在していることを発見しました。

deb cloud.r-project.org/bin/linux/… focal-cran40/ 

deb [arch=i386,amd64] cran.rstudio.com/bin/linux/… xenial/ 

deb cloud.r-project.org/bin/linux/… bionic-cran40/

Bionic以外のすべてのリポジトリをコメントアウトして再実行した後、apt updateユーザーはインストールを完了できました。

おすすめ記事