正德厚生,臻于至善

CentOS5 无法使用yum出现“M2Crypto.SSL.SSLError”错误时

https://github.com/lazywalker/centos5

CentOS 5.11 (archive vault)
Since 31 Mar 2017, CentOS 5 is not supported any more. If you run a container using centos:5 image, yum will not work.

tlsv1 is not accpted by vault repository, if you use vault repository, yum upadte will fail with error: M2Crypto.SSL.SSLError: tlsv1 alert protocol version.

YUM Repository
Disable fastmirror plugin.
Set baseurl of repos to http://archive.kernel.org/centos-vault/5.11/. (base, extras, updates)
Usage
Use in command-line.

docker run --rm -it lazywalker/centos5 /bin/bash
Or, replacement for centos:5 in Dockerfile

FROM lazywalker:centos5
需要修改/etc/yum.repos.d/目录下的配置文件。

[C5.11-base]
name=CentOS-5.11 - Base
#baseurl=http://vault.centos.org/5.11/os/$basearch/
baseurl=http://archive.kernel.org/centos-vault/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1

[C5.11-updates]
name=CentOS-5.11 - Updates
#baseurl=http://vault.centos.org/5.11/updates/$basearch/
baseurl=http://archive.kernel.org/centos-vault/5.11/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1

[C5.11-extras]
name=CentOS-5.11 - Extras
#baseurl=http://vault.centos.org/5.11/extras/$basearch/
baseurl=http://archive.kernel.org/centos-vault/5.11/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1

[C5.11-centosplus]
name=CentOS-5.11 - Plus
#baseurl=http://vault.centos.org/5.11/centosplus/$basearch/
baseurl=http://archive.kernel.org/centos-vault/5.11/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
赞(0) 打赏
未经允许不得转载:徐万新之路 » CentOS5 无法使用yum出现“M2Crypto.SSL.SSLError”错误时

评论 抢沙发

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫

登录

找回密码

注册