yum安装软件时,提示No package netstat available.的解决方法
1. 序言
如笔者在本机上运行netstat时,提示没有这个命令,向来简单粗暴,直接yum -y install netstat,显然是不能正常安装的。
[root@hadoop-103 ~]# yum -y install netstat
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/2): extras/7/x86_64/primary_db | 153 kB 00:00:00
(2/2): updates/7/x86_64/primary_db | 5.1 MB 00:00:02
No package netstat available.
Error: Nothing to do
[root@hadoop-103 ~]#
这种情况下,怎么办呢?
2. 使用“yum search”命令
此时可以使用“yum search”来查询这个命令在哪个包中:
[root@hadoop-103 ~]$ yum search netstat
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
========================================================= Matched: netstat =========================================================
dstat.noarch : Versatile resource statistics tool
net-snmp.x86_64 : A collection of SNMP protocol tools and libraries
net-tools.x86_64 : Basic networking tools #这里已经给出了netstat命令所在包
接着直接安装这个包即可:yum -y install net-tools
3.使用“yum whatprovides ”查询命令所在的包
还可以使用yum whatprovides
[root@hadoop-103 ~]# yum whatprovides *netstat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base/7/x86_64/filelists_db | 7.3 MB 00:00:04
extras/7/x86_64/filelists_db | 207 kB 00:00:00
updates/7/x86_64/filelists_db | 3.0 MB 00:00:01
1:net-snmp-utils-5.7.2-43.el7.x86_64 : Network management utilities using SNMP, from the NET-SNMP project
Repo : base
Matched from:
Filename : /usr/bin/snmpnetstat
net-tools-2.0-0.25.20131004git.el7.x86_64 : Basic networking tools
Repo : base
Matched from:
Filename : /bin/netstat
zsh-5.0.2-33.el7.x86_64 : Powerful interactive shell
Repo : base
Matched from:
Filename : /usr/share/zsh/5.0.2/functions/_netstat
net-tools-2.0-0.24.20131004git.el7.x86_64 : Basic networking tools
Repo : @base
Matched from:
Filename : /bin/netstat
[root@hadoop-103 ~]#
参考链接:https://blog.csdn.net/xuejinliang/article/details/52777475
yum安装软件时,提示No package netstat available.的解决方法的更多相关文章
- Cent OS 6/7 中通过yum安装软件时提示cannot find a valid baseurl...的解决方法
目录 1 问题描述 2 解决方法一 (Cent OS 7中有效) 3 解决方法二 (Cent OS 7中无效) 1 问题描述 新申请了虚拟机, 系统版本是Cent OS 7.2. 在安装软件的过程中, ...
- yum安装软件时提示软件包没有签名
yum install [XXX] -y --nogpgcheck
- 使用YUM安装软件时提示PackageKit睡眠中解决方法!
报错如图所示: 解决方法一:移除var/run/yum.pid文件 方法二:直接杀掉进程号 报错的时候会跟进程号 直接利用kill -9 +进程号
- 开机或者安装系统时提示tsc: Fast TSC calibration failed解决方法
其实这个问题很简单,主要是时间不对的问题. 就拿我遇到这个问题来说.我是在vm虚拟机中安装了xenserver,然后在物理机安装xencenter连接xenserver,然后在安装新的虚拟机时遇到这个 ...
- yum install错误 系统环境:Oracle Linux5.4 在通过yum安装软件时出现以下错误:
1.yum配置文件 1 [root@rh168 yum.repos.d]# cat yum.repo 2 [base] 3 name=Oracle linux 4 baseurl=file:/// ...
- Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)
新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...
- CentOS yum安装软件时保留安装包及依赖包或者自动下载安装包及相关依赖包
CentOS上安装某个软件一般都有很多相关的依赖包,当然,这也与我们安装时software selection步骤中选择的版本有关系,我们服务器在安装CentOS时一般选择Basic Web Serv ...
- Linux - yum 安装软件时被 PackageKit 锁定
问题描述 yum 安装软件的时候报错 sudo yum install netease-cloud-music 已加载插件:fastestmirror, langpacks /var/run/yum. ...
- 第二次安装docker时,报Transaction check error的解决方法
如果在yum安装软件的时候,出现了Transaction check error:这种情况,说明rpm软件包出现了冲突,解决方法是: vi /etc/yum.repos.d/epel.repo 将en ...
随机推荐
- 黎曼函数ζ(2n)的几种求法
\(\zeta (2n)\)的几种求法 目录 $\zeta (2n)$的几种求法 结论 欧拉的证明 进一步探索,$\zeta$ 函数.余切.伯努利数的关系 傅立叶分析证明 留数法证明 参考资料 结论 ...
- 使用ASP.NET实现定时计划任务,不依靠windows服务
我们怎样才能在服务器上使用asp.net定时执行任务而不需要安装windows service?我们经常需要运行一些维护性的任务或者像发送提醒邮件给用户这样的定时任务.这些仅仅通过使用Windows ...
- ~~并发编程(十三):信号量,Event,定时器~~
进击のpython ***** 并发编程--信号量,Event,定时器 本节需要了解的就是: 信号量,以及信号量和互斥锁的区别 了解时间和定时器,以及使用 信号量 信号量也是锁,本质没有变!但是他跟互 ...
- 路径总和(leetcode 113)
题目描述如下所示: 给定一个二叉树和一个目标和,找到所有从根节点到叶子节点路径总和等于给定目标和的路径.(https://leetcode-cn.com/problems/path-sum-ii/) ...
- PHP入门之函数
前言 之前对PHP的类型.运算符和流程控制简单说了一下.想了解的,这是地址. PHP入门之类型与运算符 PHP入门之流程控制 下面对函数简单说一下. 函数的基本概念 为完成某一个功能的程序指令的合集, ...
- cmd 安装第三方库问题
pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 一定要指定 信任豆瓣源,不然就算换了源 ...
- 性能分析(3)- 短时进程导致用户 CPU 使用率过高案例
性能分析小案例系列,可以通过下面链接查看哦 https://www.cnblogs.com/poloyy/category/1814570.html 系统架构背景 VM1:用作 Web 服务器,来模拟 ...
- 【源码】Python3使用Requests抓取和检测电光代理API,并查询ip代理是否成功
电光代理成立后,做一篇笔记,记录我使用Requests抓取和测试电光代理的方法 很多人学习python,不知道从何学起.很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手.很多已经做 ...
- JVM与Java体系结构
参考笔记:https://blog.csdn.net/weixin_45759791/article/details/107322503 前言 作为Java工程师的你曾被伤害过吗?你是否也遇到过这些问 ...
- 23、Interpreter 解释器模式
1.Interpreter 解释器模式 解释器模式是一种使用频率相对较低但学习难度较大的设计模式,它用于描述如何使用面向对象语言构成一个简单的语言解释器.在某些情况下,为了更好地描述某一些特定类型的问 ...