1. 程式人生 > >解決 "Couldn't resolve host 'apt.sw.be'" 錯誤

解決 "Couldn't resolve host 'apt.sw.be'" 錯誤

解決  "Couldn't resolve host 'apt.sw.be'" 錯誤

使用 yum 命令時,出錯如下:

Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'apt.sw.be'"
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'apt.sw.be'"
Trying other mirror.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again

解決辦法:

 進入目錄 cd /etc/yum.repos.d/

將 rpmforge.repo為 rpmforge.repo.bak  問題解決

如果沒有解決,或引發

Loading mirror speeds from cached hostfile   

No Packages marked for Update

這個問題

最好的辦法,換成國內的源

將上面的操作還原 即  mv  rpmforge.repo.bak 為 rpmforge.repo

進入目錄   cd /etc/yum.repos.d/

[1] 首先備份/etc/yum.repos.d/CentOS-Base.repo 

cp CentOS-Base.repo CentOS-Base.repo.bak
[2] 進入yum源配置檔案所在資料夾


[[email protected] yum.repos.d]# cd /etc/yum.repos.d/
[3] 下載163的yum源配置檔案,放入/etc/yum.repos.d/(操作前請做好相應備份)


[[email protected]

yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

[4]將下載的CentOS6-Base-163.repo 重新命名

[[email protected] yum.repos.d]# mv CentOS6-Base-163.repo CentOS6-Base.repo

[5] 清除快取 並更新

[[email protected] yum.repos.d]# yum clean all

[[email protected] yum.repos.d]# yum makecache 

yum update更新時不升級核心

[[email protected] yum.repos.d]# yum --exclude=kernel* update

同理換成阿里的源 也是一樣操作,附阿里的地址

CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
--------------------- 
作者:朱志飛 
來源:CSDN 
原文:https://blog.csdn.net/feiz3020/article/details/79812798 
版權宣告:本文為博主原創文章,轉載請附上博文連結!

相關推薦

解決 "Couldn't resolve host 'apt.sw.be'" 錯誤

解決  "Couldn't resolve host 'apt.sw.be'" 錯誤 使用 yum 命令時,出錯如下: Loaded plugins: fastestmirror Setting up Update Process Loading mirror speed

解決Couldn't resolve host 'mirrorlist.centos.org

今天在linux環境通過yum安裝軟體報了以下錯誤: [[email protected] yum.repos.d]# yum install ncurses devel -y Loaded plugins: fastestmirror, secur

yum 安裝時錯誤 Errno 14 Couldn't resolve host 解決辦法

Downloading Packages: http://mirrors.163.com/centos/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host

CentOS6.7虛擬機器配置靜態IP(curl: (6) Couldnt resolve host

虛擬機器開啟虛擬網路配置,預設的有三種 橋接的意思是和你的主機並行,相當於在你的主機的局域網裡面添加了一臺 電腦,虛擬機器網段和主機網段必定一致; NAT的意思是以你的為閘道器,在主機下添加了一個區域網,此虛擬機器在此局 域網內,虛擬機器的網段和主機的網段定不一致; 此處我選擇的是NAT模

Couldn't resolve host或者Name or service not known

先入為主-所解決問題 此問題可能出現在: 1.yum 命令安裝或其他會上網的操作時 2.ping 域名時 3.含有解析域名的其它操作 問題重現 1.yum安裝時報錯:Errno 14 Couldn't resolve host 因為使用的yum源是163的,但是報錯,解

【gitlab安裝問題集】yum安裝報錯"Couldn't resolve host 'mirror.centos.org'"

首先上報錯資訊: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Setting up Install Process Resolving Dependencies -->

couldn't resolve host api.weixin.qq.com

從這個報錯,可以很明顯的發現是域名解析不了。於是做如下排查。 1. 故障排除  1. 1 測試域名是否能解析到  簡單的使用ping來測試,發現DNS解析是否OK。 ping -c 1 api.weixin.qq.com 1.2 測試curl是否有故障  因為php程式呼叫的是curl,所以我們測試一下c

Git錯誤fatal: unable to access 'https://github.com/****.git/': Couldn't resolve host 'github.com'

今天對github上的專案進行git pull的時候出現了錯誤: fatal: unable to access 'https://github.com/****.git/: Couldn't resolve host 'github.com' 這裡的*

虛擬機centos安裝mysql遇到 Couldnt resolve host ‘mirror

server conn onf connect mys 服務器 tor dns服務 entos 網上查了一下說是DNS服務器錯誤。於是修改一下 /etc/resolv.conf添加一個nameserver 8.8.8.8完成虛擬機centos安裝mysql遇到 Couldn

yum解決 "Couldn't resolve host 'apt.sw.be'" 錯誤

安裝 debug 錯誤 repos 最好 fail 國內 rac pod 1.yum無法安裝工具 failure: repodata/repomd.xml from dag: [Errno 256] No more mirrors to try.http://apt.

CentOS Couldn't resolve host 'apt.sw.be'

epo https blank repo wiki centos etc yum 安裝 repos 最近使用 CentOS yum 安裝軟件時一直報: Couldn‘t resolve host ‘apt.sw.be‘ 後來發現 apt.sw.be 在 /e

Couldn't resolve host 'mirrorlist.centos.org'解決辦法

yum centos 今天在服務器上安裝oneinstack時,輸入命令:wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz出現:Couldn‘t resolve host ‘mirrorlist.centos.org‘無法解析解決方法:[[

CentOS網絡設置 couldn't resolve host 'mirrorlist.centos.org問題解決

popu 解決 出現 lai strong copy source watermark ack 今天在虛擬機上安裝完CentOS6.5之後,首次使用時yum命令安裝軟件時,出現一堆的”couldn‘t resolve host ‘mirrorlist.centos.org”

Linux使用yum命令安裝軟體時,連線不了網路報錯:ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"

錯誤: 解決方案: 在/etc/sysconfig/network-scripts/ifcfg-eth0檔案中配置DNS資訊: vim /etc/sysconfig/network-scripts/ifcfg-eth0 # 進入檔案編輯 修改(新增DNS): DNS1=8.8.

can't resolve host-使用GIT 請求遠端倉庫時出現的問題以及解決辦法

問題: can't resolve host-使用GIT 請求遠端倉庫時出現的問題,因以及解決,貼不出截圖,出現這問題的原因不明,大致上應該是更改了網路代理引起的 解決: 因我不知道其他人是怎麼解決該問題的,我也是誤打誤撞,記錄一下,供大家參考: winsock的百度

Couldn't resolve resource @id/pass問題的解決

就比如 這個佈局,佈局如下 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

SYbase解決Can't allocate space for object 'syslogs'錯誤

Can't allocate space for object 'syslogs' in database 'master' because 'logsegment' segment is full/has no free extents. If you ran out

解決kettle資料處理中報 Field [XXXXX] is required and couldn't be found! 錯誤

剛接觸kettle,在做資料處理時候一直提示Field [FIELD_ID] is required and couldn't be found!, FIELD_ID是標識欄位,通過自定義常量賦值,模型建立好後一直報錯 最後發現原因是核心物件使用錯誤,使用增加

git---如何解決The authenticity of host 'github.com (192.30.255.112)' can't be established.

新生成金鑰的時候,git clone或者push的時候,經常會報這樣的錯誤: The authenticity of host 'github.com (192.30.255.112)' can't be established. RSA key fing

couldn't find "libxxx.so"與"libxxx.so" is too small to be an ELF executable解決方法

跟著書學習使用Bmob後端雲的使用,匯入用到的兩個jar包後出現了下面的錯誤: java.lang.UnsatisfiedLinkError:dalvik.system.PathClassLoader[DexPathList[[zip file "xxx.apk"],na