Linux解决 -bash: nc: command not found问题

1 问题

复制代码
[root@cm ~]# nc -l 9000

-bash: nc: command not found

提示: 无法使用这个nc命令。因为没有配置这个命令。

2 解决办法

输入命令:

复制代码
[root@hadoop1 ~]# yum install -y nc

运行结果:

复制代码
[root@cm ~]# yum install -y nc

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirrors.163.com

* extras: centos.ustc.edu.cn

* updates: centos.ustc.edu.cn

Resolving Dependencies

--> Running transaction check

---> Package nmap-ncat.x86_64 2:6.40-16.el7 will be installed

--> Processing Dependency: libpcap.so.1()(64bit) for package: 2:nmap-ncat-6.40-16.el7.x86_64

--> Running transaction check

---> Package libpcap.x86_64 14:1.5.3-11.el7 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


===================================================================================================================================

Package Arch Version Repository Size

===================================================================================================================================

Installing:

nmap-ncat x86_64 2:6.40-16.el7 base 206 k

Installing for dependencies:

libpcap x86_64 14:1.5.3-11.el7 base 138 k


Transaction Summary

===================================================================================================================================

Install 1 Package (+1 Dependent package)


Total download size: 344 k

Installed size: 740 k

Downloading packages:

warning: /var/cache/yum/x86_64/7/base/packages/nmap-ncat-6.40-16.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY

Public key for nmap-ncat-6.40-16.el7.x86_64.rpm is not installed

(1/2): nmap-ncat-6.40-16.el7.x86_64.rpm | 206 kB 00:00:00

(2/2): libpcap-1.5.3-11.el7.x86_64.rpm | 138 kB 00:00:00

-----------------------------------------------------------------------------------------------------------------------------------

Total 517 kB/s | 344 kB 00:00:00

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

Importing GPG key 0xF4A80EB5:

Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"

Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5

Package : centos-release-7-4.1708.el7.centos.x86_64 (@anaconda)

From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : 14:libpcap-1.5.3-11.el7.x86_64 1/2

Installing : 2:nmap-ncat-6.40-16.el7.x86_64 2/2

Verifying : 14:libpcap-1.5.3-11.el7.x86_64 1/2

Verifying : 2:nmap-ncat-6.40-16.el7.x86_64 2/2


Installed:

nmap-ncat.x86_64 2:6.40-16.el7


Dependency Installed:

libpcap.x86_64 14:1.5.3-11.el7


Complete!
相关推荐
MediaTea9 分钟前
Python:依赖倒置原则(DIP)
开发语言·python·依赖倒置原则
Meteors.22 分钟前
安卓进阶——原理机制
android·java·开发语言
深圳佛手29 分钟前
LangChain 提供的搜素工具SerpAPIWrapper介绍
开发语言·人工智能·python
apihz33 分钟前
反向DNS查询与蜘蛛验证免费API接口详细教程
android·开发语言·数据库·网络协议·tcp/ip·dubbo
好学且牛逼的马37 分钟前
【手写Mybatis | version0.0.3 附带源码 项目文档】
开发语言·php·mybatis
海上彼尚38 分钟前
Go之路 - 2.go的常量变量[完整版]
开发语言·后端·golang
kkk_皮蛋42 分钟前
深入理解 WebRTC 临界锁实现与 C++ RAII 机制
开发语言·c++·webrtc
i_am_a_div_日积月累_42 分钟前
el-table实现自动滚动;列表自动滚动
开发语言·javascript·vue.js
weixin_307779131 小时前
Jenkins Jackson 2 API插件详解:JSON处理的基础支柱
运维·开发语言·架构·json·jenkins
JANGHIGH1 小时前
c++ 多线程(一)
开发语言·c++