R 安装问题

R 安装问题

sudo apt-get update我想在我的计算机上安装 r-base 但即使在之后它仍然不起作用sudo apt-get upgrade

以下是我写作时所得到的文字sudo apt-get install r-base

Lecture des listes de paquets…
Construction de l'arbre des dépendances…
Lecture des informations d'état…
Les paquets supplémentaires suivants seront installés : 
  autoconf automake autopoint autotools-dev build-essential bzip2-doc cdbs
  debhelper dh-autoreconf dh-strip-nondeterminism dh-translations dpkg-dev
  fakeroot g++ g++-7 gcc gcc-7 gfortran gfortran-7 gir1.2-harfbuzz-0.0
  icu-devtools intltool jq libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libarchive-cpio-perl libasan4 libatomic1 libblas-dev
  libblas3 libbz2-dev libc-dev-bin libc6-dev libcilkrts5 libcurl4 libfakeroot
  libfile-stripnondeterminism-perl libfile-which-perl libgcc-7-dev
  libgfortran-7-dev libgfortran4 libglib2.0-dev libglib2.0-dev-bin
  libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libicu-dev
  libicu-le-hb-dev libicu-le-hb0 libiculx60 libitm1 libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev libjq1 liblapack-dev liblapack3 liblsan0
  libltdl-dev liblzma-dev libmail-sendmail-perl libmpx2 libncurses5-dev
  libonig4 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpng-dev
  libpng-tools libquadmath0 libreadline-dev libstdc++-7-dev
  libsys-hostname-long-perl libtcl8.6 libtinfo-dev libtk8.6 libtool libtsan0
  libubsan0 linux-libc-dev m4 make manpages-dev pkg-config po-debconf
  python3-distutils python3-lib2to3 python3-scour r-base-core r-base-dev
  r-base-html r-cran-boot r-cran-class r-cran-cluster r-cran-codetools
  r-cran-foreign r-cran-kernsmooth r-cran-lattice r-cran-mass r-cran-matrix
  r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart r-cran-spatial
  r-cran-survival r-doc-html r-recommended scour zlib1g-dev
Paquets suggérés :
  autoconf-archive gnu-standards autoconf-doc devscripts dh-make dwz
  debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg
  gcc-multilib flex bison gcc-doc gcc-7-multilib gcc-7-locales libgcc1-dbg
  libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg
  libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg
  gfortran-multilib gfortran-doc gfortran-7-multilib gfortran-7-doc
  libgfortran4-dbg libcoarrays-dev liblapack-doc glibc-doc libglib2.0-doc
  libgraphite2-utils icu-doc libtool-doc liblzma-doc ncurses-doc readline-doc
  libstdc++-7-doc tcl8.6 tk8.6 gcj-jdk m4-doc make-doc libmail-box-perl ess
  r-doc-info | r-doc-pdf r-mathlib texlive-base texlive-latex-base
  texlive-generic-recommended texlive-fonts-recommended texlive-fonts-extra
  texlive-extra-utils texlive-latex-recommended texlive-latex-extra texinfo
Les NOUVEAUX paquets suivants seront installés :
  autoconf automake autopoint autotools-dev build-essential bzip2-doc cdbs
  debhelper dh-autoreconf dh-strip-nondeterminism dh-translations dpkg-dev
  fakeroot g++ g++-7 gcc gcc-7 gfortran gfortran-7 gir1.2-harfbuzz-0.0
  icu-devtools intltool jq libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libarchive-cpio-perl libasan4 libatomic1 libblas-dev
  libblas3 libbz2-dev libc-dev-bin libc6-dev libcilkrts5 libcurl4 libfakeroot
  libfile-stripnondeterminism-perl libfile-which-perl libgcc-7-dev
  libgfortran-7-dev libgfortran4 libglib2.0-dev libglib2.0-dev-bin
  libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libicu-dev
  libicu-le-hb-dev libicu-le-hb0 libiculx60 libitm1 libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev libjq1 liblapack-dev liblapack3 liblsan0
  libltdl-dev liblzma-dev libmail-sendmail-perl libmpx2 libncurses5-dev
  libonig4 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpng-dev
  libpng-tools libquadmath0 libreadline-dev libstdc++-7-dev
  libsys-hostname-long-perl libtcl8.6 libtinfo-dev libtk8.6 libtool libtsan0
  libubsan0 linux-libc-dev m4 make manpages-dev pkg-config po-debconf
  python3-distutils python3-lib2to3 python3-scour r-base r-base-core
  r-base-dev r-base-html r-cran-boot r-cran-class r-cran-cluster
  r-cran-codetools r-cran-foreign r-cran-kernsmooth r-cran-lattice r-cran-mass
  r-cran-matrix r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart
  r-cran-spatial r-cran-survival r-doc-html r-recommended scour zlib1g-dev
0 mis à jour, 113 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 1485 ko/98,7 Mo dans les archives.
Après cette opération, 313 Mo d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] Err:1 http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive bionic-updates/main amd64 libglib2.0-dev-bin amd64 2.56.2-0ubuntu0.18.04.1
  404  Not Found [IP : 195.83.118.1 80]
Err:2 http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive bionic-updates/main amd64 libglib2.0-dev amd64 2.56.2-0ubuntu0.18.04.1
  404  Not Found [IP : 195.83.118.1 80]
E: Impossible de récupérer http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/pool/main/g/glib2.0/libglib2.0-dev-bin_2.56.2-0ubuntu0.18.04.1_amd64.deb  404  Not Found [IP : 195.83.118.1 80]
E: Impossible de récupérer http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/pool/main/g/glib2.0/libglib2.0-dev_2.56.2-0ubuntu0.18.04.1_amd64.deb  404  Not Found [IP : 195.83.118.1 80]
E: Impossible de récupérer certaines archives, peut-être devrez-vous lancer apt-get update ou essayer avec --fix-missing ?

下面是我编写的结果sudo nano /etc/apt/sources.list

# deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic main restricted
# deb-src http://fr.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic-updates main restricted
# deb-src http://fr.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic universe
# deb-src http://fr.archive.ubuntu.com/ubuntu/ bionic universe
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic-updates universe
# deb-src http://fr.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic multiverse
# deb-src http://fr.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic-updates multiverse
# deb-src http://fr.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic-backports main restricted universe multiverse
# deb-src http://fr.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

请您帮助我安装 r-base 吧,我学习需要它!:)

答案1

确保您有正确的源 apt 列表,并将“dists”路径添加到您的源列表中。

deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/dists/ bionic-security main
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/dists/ bionic-security universe
deb http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/dists/ bionic-security multiverse

并再次运行更新/升级你的 apt,如果没有错误输出,你就可以安装你的软件包。

sudo apt-get install r-base

希望这可以帮助。

相关内容