Connection failed [IP: 91.189.91.39 80]

 

1、系统信息

root@ubuntu2204test01:/home# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:        22.04
Codename:       jammy

 

2、问题

root@ubuntu2204test01:/home# apt install r-base-core   ## 安装R过程中遇到如下问题
Connection failed [IP: 91.189.91.39 80]

 

3、解决方法(更换国内源)

001、进入 /etc/apt/目录:

root@ubuntu2204test01:/home# cd /etc/apt
root@ubuntu2204test01:/etc/apt# pwd
/etc/apt

 

002、备份原镜像文件

root@ubuntu2204test01:/etc/apt# cp sources.list sources.list_bak

 

003、编辑镜像源文件

root@ubuntu2204test01:/etc/apt# vim sources.list    ## 输入如下内容,保存退出
复制代码
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
复制代码

 

 

004、跟新软件库

root@ubuntu2204test01:/etc/apt# apt update

 

005、升级软件

root@ubuntu2204test01:/etc/apt# apt upgrade

 

006、再次安装R

root@ubuntu2204test01:/etc/apt# apt install r-base-core

 

4、测试R

复制代码
root@ubuntu2204test01:/etc/apt# R

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 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.

>
复制代码

没有问题。

 

posted @   小鲨鱼2018  阅读(523)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示