使用腾讯云安装软件报错:
http://mirrors.tencentyun.com/epel/7/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.tencentyun.com; 未知的错误"
接着显示:
One of the configured repositories failed (EPEL for redhat/centos 7 - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
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. Run the command with the repository temporarily disabled
yum --disablerepo=epel ...
4. Disable the repository permanently, 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 epel
or
subscription-manager repos --disable=epel
5. 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=epel.skip_if_unavailable=true
failure: repodata/repomd.xml from epel: [Errno 256] No more mirrors to try.
上边给出了一些解决方法,使用后解决了一些软件不能下载的问题,但是docker安装不上,不是报域名解析异常就是镜像找不到,等待过程中还会报用户取消等的提示,一键安装失败,那就只能另辟蹊径一步一步来了。
首先安装yum-utils包:
接着 设置仓库,可以按需选择官方、阿里云的docker社区版repo
插件安装完毕后,接着安装Docker Engine-Community 和 containerd
$ sudo yum install docker-ce docker-ce-cli containerd.io
最后查看docker:
启动docker:
$sudo systemctl start docker
验证是否安装正常:
$sudo docker run hello-world
看到上述红框信息说明docker正常启动运行。
=============================时光分割线====================================
今天老毛病又犯了,找不到命令或者权限不够,于是求助tencent客服,提了工单帮助解决了问题。
按顺序执行:
chattr -i /usr/bin/docker
chmod 755 /usr/bin/docker
/usr/bin/docker 是你docker安装的目录,修改权限也是修改的这个文件的权限,通过远程连接工具直接修改权限发现不起作用,原因未知,就通过命令行解决吧。