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

问题:

[hadoop@hadoop001 conf]$ nc -lk 9999
-bash: nc: command not found

从提示信息中我们可以知道,是由于nc命令无法被找到
没有配置nc的命令
解决:
[root@hadoop001 ~]# yum install -y nc

[root@hadoop001 ~]# yum install -y nc
Loaded plugins: fastestmirror
base                                                         | 3.6 kB  00:00:00     
epel                                                         | 4.7 kB  00:00:00     
extras                                                       | 3.4 kB  00:00:00     
updates                                                      | 3.4 kB  00:00:00     
(1/6): extras/7/x86_64/primary_db                            | 156 kB  00:00:00     
(2/6): base/7/x86_64/group_gz                                | 166 kB  00:00:00     
(3/6): epel/x86_64/updateinfo                                | 953 kB  00:00:00     
(4/6): updates/7/x86_64/primary_db                           | 1.3 MB  00:00:00     
(5/6): epel/x86_64/primary_db                                | 6.6 MB  00:00:01     
(6/6): base/7/x86_64/primary_db                              | 6.0 MB  00:00:01     
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package nmap-ncat.x86_64 2:6.40-16.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

Transaction Summary
====================================================================================
Install  1 Package

Total download size: 206 k
Installed size: 423 k
Downloading packages:
nmap-ncat-6.40-16.el7.x86_64.rpm                             | 206 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:nmap-ncat-6.40-16.el7.x86_64                                   1/1 
  Verifying  : 2:nmap-ncat-6.40-16.el7.x86_64                                   1/1 

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

Complete!

解决

[hadoop@hadoop001 conf]$  nc -lk 9999
a,a,a,

  • 5
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值