我尝试在我的 Ubuntu 20.04(从 16.04 更新)上更新 R。
因此我通过以下方式删除了 R 的先前版本:
sudo apt-get purge r-base* r-recommended r-cran-*
sudo apt autoremove
之后,我通过添加好的存储库来更新我的 /etc/apt/sources.list
deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
正确的键是:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
但是,我在更新 sources.list 期间收到一个错误:
sudo apt-get update
Ign :10 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease
Err :11 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Release
Could not wait for server fd - select (11: Ressource temporairement non disponible) [IP : xxx.xxx.xxx.xxx xxxx]
Lecture des listes de paquets... Fait
W: Le fichier configuré « partener/source/Sources » ne sera pas pris en compte car le dépôt « http://archive.canonical.com/ubuntu focal InRelease » ne dispose pas de la source « partener » (erreur de saisie dans sources.list ?)
E: Le dépôt https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Release n'a pas de fichier Release.
在工作中,我使用代理。因此,代理参数在系统参数中的网络参数上指定,但也为 apt 指定。(/etc/apt/apt.conf.d/ 中的 80proxy 文件)
通过此配置,只能访问 R 3.6:
apt-cache policy r-base r-base-core r-base-dev r-recommended
r-base:
Installé : (aucun)
Candidat : 3.6.3-2
Table de version :
3.6.3-2 500
500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
500 http://fr.archive.ubuntu.com/ubuntu focal/universe i386 Packages
r-base-core:
Installé : (aucun)
Candidat : 3.6.3-2
Table de version :
3.6.3-2 500
500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
r-base-dev:
Installé : (aucun)
Candidat : 3.6.3-2
Table de version :
3.6.3-2 500
500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
500 http://fr.archive.ubuntu.com/ubuntu focal/universe i386 Packages
r-recommended:
Installé : (aucun)
Candidat : 3.6.3-2
Table de version :
3.6.3-2 500
500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
500 http://fr.archive.ubuntu.com/ubuntu focal/universe i386 Packages
我有一台笔记本电脑,其中也更新了 Ubuntu 20.04 和相同的 sources.list,并且我没有遇到家庭网络错误。
我怀疑错误是由于代理参数引起的,但我不确定。您能帮助配置并成功安装 R 的最新版本吗?
非常感谢你的帮助。
我的来源列表:
more /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://fr.archive.ubuntu.com/ubuntu/ focal main restricted
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal-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://fr.archive.ubuntu.com/ubuntu/ focal universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal universe
deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal-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://fr.archive.ubuntu.com/ubuntu/ focal multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal-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://fr.archive.ubuntu.com/ubuntu/ focal-backports main restricted univers
e multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal-backports main restricted uni
verse multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
deb-src http://security.ubuntu.com/ubuntu focal-security 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 focal partner
deb-src http://archive.canonical.com/ubuntu focal partner
## The Comprehensive R Archive Network
deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
答案1
联系 IT 服务后,他们要求我测试代理参数的另一个地址,但我收到了新的错误。
sudo apt-get update
Ign :1 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease
Atteint :2 http://fr.archive.ubuntu.com/ubuntu focal InRelease
Atteint :3 http://fr.archive.ubuntu.com/ubuntu focal-updates InRelease
Err :4 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Release
Could not handshake: An unexpected TLS packet was received. [IP : 10.3.0.11 3128]
Atteint :5 http://fr.archive.ubuntu.com/ubuntu focal-backports InRelease
Atteint :6 http://repository.spotify.com stable InRelease
Atteint :7 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal InRelease
Réception de :8 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Lecture des listes de paquets... Fait
E: Le dépôt https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut.
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
有了这个新错误,我发现了之前的帖子
apt update:无法握手:收到了意外的 TLS 数据包
因此我尝试删除 https_proxy 地址中的“s”......成功了!
此外,apt-get update 命令中考虑的唯一代理参数位于 /etc/apt/apt.conf 文件中。
more apt.conf
Acquire::http::proxy "http://myaddress.XXX.fr:myport/";
Acquire::https::proxy "http://myaddress.XXX.fr:myport/";
Acquire::ftp::proxy "ftp://myaddress.XXX.fr:myport/";
此解决方案也适用于初始代理参数。