linux "-bash: telnet: command not found" telnet不是命令

linux 专栏收录该内容
10 篇文章 0 订阅

今天运行yum命令安装telnet报错

[root@localhost ~]# telnet
-bash: telnet: command not found

居然报错了,然后安装运行下面的命令

yum list telnet*   查看telnet相关的安装包

yum install telnet-server 安装telnet服务
yum install telnet.* 安装telnet客户端


[root@localhost ~]# yum install telnet*
已加载插件:fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
设置安装进程
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/%24releasever/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
尝试其他镜像。
错误:Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again


发现%24releasever/路径找不到,后来改成对应的版本号,如我的改成了6,$releasever这个变量没有找到在哪里配置,所以我手动改成了6,呜呜郁闷。。。。。

[root@localhost ~]# yum list telnet*
已加载插件:fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
尝试其他镜像。

错误:Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again


奶奶的找了很多次终于找到问题了,从6开始已经没有addons文件了,我嚓我嚓,网上百度了很多东西都没有说明。。。。。。。。。。。。

一个小问题


对比了centOs5跟centOs6文件的对比才发现



[root@localhost ~]# vi /etc/yum.repos.d/CentOS5-Base-163.repo
注释掉addons行的信息如:
片段

#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
#[addons]
#name=CentOS-$releasever - Addons - 163.com
#baseurl=http://mirrors.163.com/centos/6/addons/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=addons
#gpgcheck=1
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


注释掉之后就可以用了

[root@localhost ~]# yum list telnet*
已加载插件:fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Loading mirror speeds from cached hostfile
base                                                                                                                                                                    | 3
base/primary_db                                                                                                                                     | 4.7 MB     00:52     
extras                                                                                                                                              | 3.4 kB     00:00     
extras/primary_db                                                                                                                                   |  37 kB     00:00     
updates                                                                                                                                             | 3.4 kB     00:00     
updates/primary_db                                                                                                                                  | 748 kB     00:07     
可安装的软件包
telnet.x86_64                                                                          1:0.17-48.el6                                                                   base
telnet-server.x86_64                                                                   1:0.17-48.el6                                                                   base

妈蛋终于可以用。。。。。

有报错了。。。。。。。

[root@localhost ~]# yum install telnet-server
已加载插件:fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
设置安装进程
Loading mirror speeds from cached hostfile
解决依赖关系
--> 执行事务检查
---> Package telnet-server.x86_64 1:0.17-48.el6 will be 安装
--> 处理依赖关系 xinetd,它被软件包 1:telnet-server-0.17-48.el6.x86_64 需要
--> 执行事务检查
---> Package xinetd.x86_64 2:2.3.14-40.el6 will be 安装
--> 完成依赖关系计算

依赖关系解决

===========================================================================================================================================================================
 软件包                                      架构                                 版本                                            仓库                                大小
===========================================================================================================================================================================
正在安装:
 telnet-server                               x86_64                               1:0.17-48.el6                                   base                                37 k
为依赖而安装:
 xinetd                                      x86_64                               2:2.3.14-40.el6                                 base                               122 k

事务概要
===========================================================================================================================================================================
Install       2 Package(s)

总下载量:159 k
Installed size: 313 k
确定吗?[y/N]:y
下载软件包:
(1/2): telnet-server-0.17-48.el6.x86_64.rpm                                                                                                         |  37 kB     00:00     
(2/2): xinetd-2.3.14-40.el6.x86_64.rpm                                                                                                              | 122 kB     00:01     
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                                        23 kB/s | 159 kB     00:06     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
Importing GPG key 0xE8562897:
 Userid: "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>"
 From  : http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
确定吗?[y/N]:y


telnet-server-0.17-48.el6.x86_64.rpm 的公钥没有安装


突然发现妈蛋的163的问题有问题,我的是CentOS-6版本,可是他的包里面都是CentOS-5的,我草。。。。。。。。。


http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5   改成

http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6就OK 了。。。。。。。。。。。。


  • 1
    点赞
  • 0
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值