尝试安装 R 4.0 导致了很多问题

尝试安装 R 4.0 导致了很多问题

我尝试在 Ubuntu 18 上安装 R,但没有成功。

sudo add-apt-repository 'deb cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'; 
sudo apt update
sudo apt install r-base 
After this operation, 0 B of additional disk space will be used.
/bin/sh: 1: /usr/sbin/dpkg-preconfigure: not found
Setting up kmod (24-1ubuntu3.3) ...
/var/lib/dpkg/info/kmod.postinst: 76: /var/lib/dpkg/info/kmod.postinst: update-rc.d: not found
dpkg: error processing package kmod (--configure):
 installed kmod package post-installation script subprocess returned error exit status 1
Setting up mime-support (3.60ubuntu1) ...
/var/lib/dpkg/info/mime-support.postinst: 24: /var/lib/dpkg/info/mime-support.postinst: /usr/sbin/update-mime: not found
dpkg: error processing package mime-support (--configure):
 installed mime-support package post-installation script subprocess returned error exit status 127
Setting up linux-base (4.5ubuntu1.1) ...
/var/lib/dpkg/info/linux-base.postinst: 17: exec: /usr/share/debconf/frontend: not found
dpkg: error processing package linux-base (--configure):
 installed linux-base package post-installation script subprocess returned error exit status 127
Setting up r-base-core (4.0.0-1.1804.0) ...
/usr/share/debconf/confmodule: /usr/share/debconf/frontend: /usr/bin/perl: bad interpreter: No such file or directory
/usr/share/debconf/confmodule: line 17: /usr/share/debconf/frontend: Success
dpkg: error processing package r-base-core (--configure):
 installed r-base-core package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-cran-class:
 r-cran-class depends on r-base-core (>= 4.0.0-1.1804.0); however:
  Package r-base-core is not configured yet.
 r-cran-class depends on r-api-4.0; however:
  Package r-api-4.0 is not installed.
  Package r-base-core which provides r-api-4.0 is not configured yet.

dpkg: error processing package r-cran-class (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python2.7:
 python2.7 depends on mime-support; however:
  Package mime-support is not configured yet.

dpkg: error processing package python2.7 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of r-cran-kernsmooth:
 r-cran-kernsmooth depends on r-base-core; however:
  Package r-base-core is not configured yet.

No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: error processing package r-cran-kernsmooth (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of r-cran-nnet:
 r-cran-nnet depends on r-base-core (>= 4.0.0-1.1804.0); however:
  Package r-base-core is not configured yet.
 r-cran-nnet depends on r-api-4.0; however:
  Package r-api-4.0 is not installed.
  Package r-base-core which provides r-api-4.0 is not configured yet.

dpkg: error processing package r-cran-nnet (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up cups-daemon (2.2.7-1ubuntu2.8) ...
/var/lib/dpkg/info/cups-daemon.postinst: 150: /var/lib/dpkg/info/cups-daemon.postinst: update-rc.d: not found
dpkg: error processing package cups-daemon (--configure):
 installed cups-daemon package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-base-dev:
 r-base-dev depends on r-base-core (>= 4.0.0-1.1804.0); however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-base-dev (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of cups-core-drivers:
 cups-core-drivers depends on cups-daemon (>= 2.2.7-1ubuntu2.8); however:
  Package cups-daemon is not configured yet.

dpkg: error processing package cups-core-drivers (--configure):
 dependency problems - leaving unconfigured
Setting up uuid-runtime (2.31.1-0.4ubuntu3.6) ...
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/uuid-runtime.postinst: 17: /var/lib/dpkg/info/uuid-runtime.postinst: update-rc.d: not found
dpkg: error processing package uuid-runtime (--configure):
 installed uuid-runtime package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              Setting up cups-bsd (2.2.7-1ubuntu2.8) ...
/var/lib/dpkg/info/cups-bsd.postinst: 17: exec: /usr/share/debconf/frontend: not found
dpkg: error processing package cups-bsd (--configure):
 installed cups-bsd package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-cran-mgcv:
 r-cran-mgcv depends on r-base-core; however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-cran-mgcv (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-base-html:
 r-base-html depends on r-base-core; however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-base-html (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-cran-spatial:
 r-cran-spatial depends on r-base-core; however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-cran-spatial (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-base:
 r-base depends on r-base-core (>= 4.0.0-1.1804.0); however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-base (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up apport (2.20.9-0ubuntu7.14) ...
apport-autoreport.service is a disabled or a static unit, not starting it.
/var/lib/dpkg/info/apport.postinst: 68: /var/lib/dpkg/info/apport.postinst: update-rc.d: not found
dpkg: error processing package apport (--configure):
 installed apport package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-cran-mass:
 r-cran-mass depends on r-base-core (>= 4.0.0-1.1804.0); however:
  Package r-base-core is not configured yet.
 r-cran-mass depends on r-api-4.0; however:
  Package r-api-4.0 is not installed.
  Package r-base-core which provides r-api-4.0 is not configured yet.

dpkg: error processing package r-cran-mass (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-cran-survival:
 r-cran-survival depends on r-base-core; however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-cran-survival (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of bluez:
 bluez depends on kmod; however:
  Package kmod is not configured yet.

dpkg: error processing package bluez (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python2.7-dev:
 python2.7-dev depends on python2.7 (= 2.7.17-1~18.04ubuntu1); however:
  Package python2.7 is not configured yet.

dpkg: error processing package python2.7-dev (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up linux-firmware (1.173.17) ...
/usr/sbin/update-initramfs: 218: /usr/sbin/update-initramfs: linux-version: not found
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libpython2.7-stdlib:amd64:
 libpython2.7-stdlib:amd64 depends on mime-support; however:
  Package mime-support is not configured yet.

dpkg: error processing package libpython2.7-stdlib:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libpython3.6-stdlib:amd64:
 libpython3.6-stdlib:amd64 depends on mime-support; however:
  Package mime-support is not configured yet.

dpkg: error processing package libpython3.6-stdlib:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of r-cran-boot:
 r-cran-boot depends on r-base-core; however:
  Package r-base-core is not configured yet.

No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: error processing package r-cran-boot (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of r-recommended:
 r-recommended depends on r-base-core (>= 4.0.0-1.1804.0); however:
  Package r-base-core is not configured yet.
 r-recommended depends on r-cran-boot (>= 1.2.19); however:
  Package r-cran-boot is not configured yet.
 r-recommended depends on r-cran-kernsmooth (>= 2.2.14); however:
  Package r-cran-kernsmooth is not configured yet.
 r-recommended depends on r-cran-mgcv (>= 1.1.5); however:
  Package r-cran-mgcv is not configured yet.
 r-recommended depends on r-cran-survival (>= 2.13.2-1); however:
  Package r-cran-survival is not configured yet.
 r-recommended depends on r-cran-mass; however:
  Package r-cran-mass is not configured yet.
 r-recommended depends on r-cran-class; however:
  Package r-cran-class is not configured yet.
 r-recommended depends on r-cran-nnet; however:
  Package r-cran-nnet is not configured yet.
 r-recommended depends on r-cran-spatial; however:
  Package r-cran-spatial is not configured yet.

dpkg: error processing package r-recommended (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3.6:
 python3.6 depends on libpython3.6-stdlib (= 3.6.9-1~18.04ubuntu1); however:
  Package libpython3.6-stdlib:amd64 is not configured yet.
 python3.6 depends on mime-support; however:
  Package mime-support is not configured yet.

dpkg: error processing package python3.6 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-cran-codetools:
 r-cran-codetools depends on r-base-core; however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-cran-codetools (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: dependency problems prevent configuration of r-cran-matrix:
 r-cran-matrix depends on r-base-core; however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-cran-matrix (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of r-cran-lattice:
 r-cran-lattice depends on r-base-core; however:
  Package r-base-core is not configured yet.

dpkg: error processing package r-cran-lattice (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of r-cran-nlme:
 r-cran-nlme depends on r-cran-lattice (>= 0.12-11.1); however:
  Package r-cran-lattice is not configured yet.

dpkg: error processing package r-cran-nlme (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of cups:
 cups depends on cups-core-drivers (>= 2.2.7-1ubuntu2.8); however:
  Package cups-core-drivers is not configured yet.
 cups depends on cups-daemon (>= 2.2.7-1ubuntu2.8); however:
  Package cups-daemon is not configured yet.

dpkg: error processing package cups (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of apport-gtk:
 apport-gtk depends on apport (>= 0.41); however:
  Package apport is not configured yet.

dpkg: error processing package apport-gtk (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libpython3.6-dev:amd64:
 libpython3.6-dev:amd64 depends on libpython3.6-stdlib (= 3.6.9-1~18.04ubuntu1); however:
  Package libpython3.6-stdlib:amd64 is not configured yet.

dpkg: error processing package libpython3.6-dev:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of pulseaudio-module-bluetooth:
 pulseaudio-module-bluetooth depends on bluez (>= 5.23); however:
  Package bluez is not configured yet.

dpkg: error processing package pulseaudio-module-bluetooth (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of r-cran-rpart:
No apport report written because MaxReports is reached already
                                                               r-cran-rpart depends on r-cran-survival; however:
  Package r-cran-survival is not configured yet.

dpkg: error processing package r-cran-rpart (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libpython2.7:amd64:
 libpython2.7:amd64 depends on libpython2.7-stdlib (= 2.7.17-1~18.04ubuntu1); however:
  Package libpython2.7-stdlib:amd64 is not configured yet.

dpkg: error processing package libpython2.7:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libpython2.7-dev:amd64:
 libpython2.7-dev:amd64 depends on libpython2.7-stdlib (= 2.7.17-1~18.04ubuntu1); however:
  Package libpython2.7-stdlib:amd64 is not configured yet.
 libpython2.7-dev:amd64 depends on libpython2.7 (= 2.7.17-1~18.04ubuntu1); however:
  Package libpython2.7:amd64 is not configured yet.

dpkg: error processing package libpython2.7-dev:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3.6-dev:
 python3.6-dev depends on python3.6 (= 3.6.9-1~18.04ubuntu1); however:
  Package python3.6 is not configured yet.
 python3.6-dev depends on libpython3.6-dev (= 3.6.9-1~18.04ubuntu1); however:
  Package libpython3.6-dev:amd64 is not configured yet.

dpkg: error processing package python3.6-dev (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libpython3.6:amd64:
 libpython3.6:amd64 depends on libpython3.6-stdlib (= 3.6.9-1~18.04ubuntu1); however:
  Package libpython3.6-stdlib:amd64 is not configured yet.

dpkg: error processing package libpython3.6:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of samba-libs:amd64:
 samba-libs:amd64 depends on libpython2.7 (>= 2.7); however:
  Package libpython2.7:amd64 is not configured yet.

dpkg: error processing package samba-libs:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libsmbclient:amd64:
 libsmbclient:amd64 depends on samba-libs (= 2:4.7.6+dfsg~ubuntu-0ubuntu2.16); however:
  Package samba-libs:amd64 is not configured yet.

dpkg: error processing package libsmbclient:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 kmod
 mime-support
 linux-base
 r-base-core
 r-cran-class
 python2.7
 r-cran-kernsmooth
 r-cran-nnet
 cups-daemon
 r-base-dev
 cups-core-drivers
 uuid-runtime
 cups-bsd
 r-cran-mgcv
 r-base-html
 r-cran-spatial
 r-base
 apport
 r-cran-mass
 r-cran-survival
 bluez
 python2.7-dev
 linux-firmware
 libpython2.7-stdlib:amd64
 libpython3.6-stdlib:amd64
 r-cran-boot
 r-recommended
 python3.6
 r-cran-codetools
 r-cran-matrix
 r-cran-lattice
 r-cran-nlme
 cups
 apport-gtk
 libpython3.6-dev:amd64
 pulseaudio-module-bluetooth
 r-cran-rpart
 libpython2.7:amd64
 libpython2.7-dev:amd64
 python3.6-dev
 libpython3.6:amd64
 samba-libs:amd64
 libsmbclient:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

When I start R it looks like this:

/usr/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
cannot find system Renviron

R version 4.0.0 (2020-04-24) -- "Arbor Day"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Error: package or namespace load failed for ‘utils’:
 .onLoad failed in loadNamespace() for 'utils', details:
  call: options(op.utils[toset])
  error: invalid value for 'editor'
Error: package or namespace load failed for ‘stats’:
 .onLoad failed in loadNamespace() for 'utils', details:
  call: options(op.utils[toset])
  error: invalid value for 'editor'
During startup - Warning messages:
1: package ‘utils’ in options("defaultPackages") was not found 
2: package ‘stats’ in options("defaultPackages") was not found 
> 

非常感谢您提供的关于如何解决此问题的任何有用提示。

@N0rbert:

sudo apt-get install --reinstall debconf mime-support init-system-helpers initramfs-tools结果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 0 not upgraded.
47 not fully installed or removed.
Need to get 171 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 init-system-helpers all 1.51 [37,3 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu bionic-updates/main amd64 debconf all 1.5.66ubuntu1 [124 kB]
Get:3 http://de.archive.ubuntu.com/ubuntu bionic-updates/main amd64 initramfs-tools all 0.130ubuntu3.9 [9.568 B]
Fetched 171 kB in 0s (672 kB/s)             
E: Internal Error, No file name for mime-support:amd64

相关内容