CentOS 安装 sl(小火车)

1. 安装

  • 一般命令行中执行 yum -y install sl

2. 上面如果不行

  • yum -y upgrade
  • 备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
  • 下载对应版本repo文件,放入/etc/yum.repos.d/(操作前请做好相应备份)
#Centos7:

wget -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS7-Base-163.repo

#Centos6:

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

#Centos5:

wget -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS5-Base-163.repo

3. 运行以下命令生成缓存

  • 执行
yum clean all
yum makecache

4. 再次执行(还是不行)

[root@localhost packages]# yum -y install sl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
No package sl available.
Error: Nothing to do
[root@localhost packages]# 

5. 下载

  • 下载 epel-release-6-8.noarch.rpm
wget https://archives.fedoraproject.org/pub/archive/epel/6/x86_64/epel-release-6-8.noarch.rpm
  • 安装
rpm -ivh epel-release-6-8.noarch.rpm 
  • 继续安装(成功)
yum -y install sl

6. 输入 sl

sl
oes17-w1hj4.gif

你可能感兴趣的:(CentOS 安装 sl(小火车))