树莓派(Raspberry Pi 3)安装centos7后yum无法使用解决办法

树莓派(Raspberry Pi 3)安装centos7后yum无法使用解决办法

人穷,闲鱼淘了个二手的树莓派3 英国版,无奈咱也不会用,很无奈~

安装教程百度到的差不多都可以,找个格式正常的一步一步来就八九不离十

然后安装后想装个docker,就悲剧了,yum安装各种东西都超时

毕竟咱也是有阿里服务器的人呐,第一时间就想到弄个国内源就ok了嘛,然而并不行

各种百度依旧找不到原因(可能是因为我不会百度吧)

最终解决方案,参考树莓派centos7(armhf) yum源(中国科学技术大学)

建议看完再操作

# 1. 编辑CentOS-Base.repo
[root@centos-rpi3 ~]# vi /etc/yum.repos.d/CentOS-Base.repo
# 2. 不会用vi的朋友别乱动,可以按着d键不松手,即可清空整个文件
# 会的朋友直接清空它就行了
# 3. 复制下面的文字到这个文件中,使用putty的话就是在windows下复制,然后再putty中右键就可以粘贴
# 4. 按Esc,然后输入引号内的内容:“:wq”注意英文符号,随后会退出vi
# 5. 执行下面两句代码:
yum clean all
yum makecache
# 然后就大功告成了,还有问题欢迎评论区留言

就是复制下面这些东西:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/os/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/updates/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/extras/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32
上一篇:HUD-1142


下一篇:System Error. Code:1722. RPC服务器不可用解决办法