2015-04-24 110 views
2

我正在通过以下链接http://www.idevelopment.info/data/AWS/AWS_Tips/AWS_Management/AWS_10.shtml在AWS EC2中创建自己的centOS 64位ami。现在,我正在为EC2实例创建自己的AMI。使用EC2实例创建AWS EC2自己的AMI时出现错误

所以,当我发出此命令#百胜-c /opt/ec2/yum/yum-xen.conf --installroot =到/ mnt/EC2映像-y groupinstall基地我收到以下错误,

yum -c /opt/ec2/yum/yum-xen.conf --installroot =/mnt/ec2-image -y groupinstall基地 没有安装的组文件。 也许运行:yum组标记转换(请参阅man yum) 无法检索镜像列表http://repo。$ awsregion。$ awsdomain/$ releasever/main /mirror.list错误为 14:PYCURL ERROR 6 - “无法解析主机:回购。$ awsregion。$ awsdomain“

其中一个配置的存储库失败(未知), 和yum没有足够的缓存数据继续。在这一点上,唯一可以做的安全事情就是失败。有几种方法来解决这个问题:

1. Contact the upstream for the repository and get them to fix the problem. 

2. Reconfigure the baseurl/etc. for the repository, to point to a working 
    upstream. This is most often useful if you are using a newer 
    distribution release than is supported by the repository (and the 
    packages for the previous distribution release still work). 

3. Disable the repository, so yum won't use it by default. Yum will then 
    just ignore the repository until you permanently enable it again or use 
    --enablerepo for temporary usage: 

     yum-config-manager --disable <repoid> 

4. Configure the failing repository to be skipped, if it is unavailable. 
    Note that yum will try to contact the repo. when it runs most commands, 
    so will have to try and fail each time (and thus. yum will be be much 
    slower). If it is a very temporary problem though, this is often a nice 
    compromise: 

     yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true 

    Cannot find a valid baseurl for repo: amzn-main/$releasever 

我不明白这个问题。任何人都可以帮助我解决这个问题,思想也会有所帮助。

TIA ...,

回答

1

可能有以下原因之上。 1.检查服务器和连接到互联网的交换机之间是否有代理?如果有,请删除代理。

  1. 建议使用yum clear all命令清除所有内容。

  2. 检查yum.conf文件并查看存储库是否被评论等。取消注释存储库。

  3. 您可能还想禁用最快的镜像插件。检查这是否1,2,3以上失败。

  4. 如果以上4个选项都不起作用,那么dns可能会出现问题。