rを更新したかったのですが、更新しようとすると
sudo apt install r-base
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.0.3-1.2004.0) but 3.4.4-1ubuntu1 is to be installed
Depends: r-recommended (= 4.0.3-1.2004.0) but 3.4.4-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
johannes@johannes-UX303UB:~$ sudo apt install r-base-core
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-core : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.3 is to be installed
Depends: libicu66 (>= 66.1-1~) but it is not installable
Depends: libreadline8 (>= 6.0) but it is not installable
Recommends: r-recommended but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
johannes@johannes-UX303UB:~$ sudo apt install libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version (2.27-3ubuntu1.3).
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
johannes@johannes-UX303UB:~$
私はこの問題に遭遇しましたが、UbuntuをUbuntu 20.04に更新しようとすると、rを更新できるようになるとこのエラーが発生しました
johannes@johannes-UX303UB:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
r-cran-boot r-cran-class r-cran-foreign r-cran-rpart r-cran-spatial
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
johannes@johannes-UX303UB:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
johannes@johannes-UX303UB:~$
私には、一方を更新せずにもう一方を更新できないように思えます。または、解決策が表示されないだけですか。
よろしくお願いします。
これは、コードを試すときのメッセージです
johannes@johannes-UX303UB:~$ sudo apt install r-cran-boot r-cran-class r-cran-foreign r-cran-rpart r-cran-spatial
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-cran-boot : Depends: r-base-core (>= 4.0.0-1.2004.0) but 3.4.4-1ubuntu1 is to be installed
Depends: r-api-4.0
r-cran-class : Depends: r-base-core (>= 4.0.0-1.2004.0) but 3.4.4-1ubuntu1 is to be installed
Depends: r-api-4.0
r-cran-foreign : Depends: r-base-core (>= 4.0.0-1.2004.0) but 3.4.4-1ubuntu1 is to be installed
Depends: r-api-4.0
r-cran-rpart : Depends: r-base-core (>= 3.6.3.20200326-1focal) but 3.4.4-1ubuntu1 is to be installed
Depends: r-api-4.0
r-cran-spatial : Depends: r-base-core (>= 3.6.3.20200409-1bionic) but 3.4.4-1ubuntu1 is to be installed
Depends: r-api-4.0
E: Unable to correct problems, you have held broken packages.
コメントで述べたように、LTS間で2年ごとではなく、6か月ごとにアップグレードした経験がありますが、最後のメッセージのようにエラーが発生した場合は、明示的にインストールを要求するのが最善の方法です。そして、エラーが表示され、すなわち
sudo apt install r-cran-boot r-cran-class r-cran-foreign \
r-cran-rpart r-cran-spatial
やってみませんか?(わかりやすくするために追加した改行を差し引いたものです。)
また、おそらく「今のところ」(私も使用しているCRANの優れたCRAN Ubuntuバイナリ)を無効にして、アップグレードを容易にします。構成内のそのようなエントリをコメントアウトする場合、後続をapt
実行するとapt update
、apt-cache policy r-base-core
フォーカルが表示されます。したがって、アップグレードを「簡単」にするには、最後の行だけがあることを確認してください。
edd@rob:~$ apt-cache policy r-base-core
r-base-core:
Installed: 4.0.3-1.2004.0
Candidate: 4.0.3-1.2004.0
Version table:
*** 4.0.3-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
100 /var/lib/dpkg/status
4.0.2-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
4.0.1-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
4.0.0-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
3.6.3-2 500
500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
edd@rob:~$
システムが20.04になったら、CRANを有効にしてR4.0.3に簡単にアクセスできます。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加