樹莓派(Raspberry Pi 3)安裝centos7後yum沒法使用解決辦法
人窮,閒魚淘了個二手的樹莓派3 英國版,無奈咱也不會用,很無奈~docker
安裝教程百度到的差很少均可以,找個格式正常的一步一步來就八九不離十windows
而後安裝後想裝個docker,就悲劇了,yum安裝各類東西都超時centos
畢竟咱也是有阿里服務器的人吶,第一時間就想到弄個國內源就ok了嘛,然而並不行bash
各類百度依舊找不到緣由(多是由於我不會百度吧)服務器
最終解決方案,參考樹莓派centos7(armhf) yum源(中國科學技術大學)less
建議看完再操做
# 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 # 而後就大功告成了,還有問題歡迎評論區留言
就是複製下面這些東西:this
# 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