樹莓派(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
