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

我不是女神ヾ 2024-02-19 16:04 140阅读 0赞

问题:

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

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

  1. [root@hadoop001 ~]# yum install -y nc
  2. Loaded plugins: fastestmirror
  3. base | 3.6 kB 00:00:00
  4. epel | 4.7 kB 00:00:00
  5. extras | 3.4 kB 00:00:00
  6. updates | 3.4 kB 00:00:00
  7. (1/6): extras/7/x86_64/primary_db | 156 kB 00:00:00
  8. (2/6): base/7/x86_64/group_gz | 166 kB 00:00:00
  9. (3/6): epel/x86_64/updateinfo | 953 kB 00:00:00
  10. (4/6): updates/7/x86_64/primary_db | 1.3 MB 00:00:00
  11. (5/6): epel/x86_64/primary_db | 6.6 MB 00:00:01
  12. (6/6): base/7/x86_64/primary_db | 6.0 MB 00:00:01
  13. Determining fastest mirrors
  14. Resolving Dependencies
  15. --> Running transaction check
  16. ---> Package nmap-ncat.x86_64 2:6.40-16.el7 will be installed
  17. --> Finished Dependency Resolution
  18. Dependencies Resolved
  19. ====================================================================================
  20. Package Arch Version Repository Size
  21. ====================================================================================
  22. Installing:
  23. nmap-ncat x86_64 2:6.40-16.el7 base 206 k
  24. Transaction Summary
  25. ====================================================================================
  26. Install 1 Package
  27. Total download size: 206 k
  28. Installed size: 423 k
  29. Downloading packages:
  30. nmap-ncat-6.40-16.el7.x86_64.rpm | 206 kB 00:00:00
  31. Running transaction check
  32. Running transaction test
  33. Transaction test succeeded
  34. Running transaction
  35. Installing : 2:nmap-ncat-6.40-16.el7.x86_64 1/1
  36. Verifying : 2:nmap-ncat-6.40-16.el7.x86_64 1/1
  37. Installed:
  38. nmap-ncat.x86_64 2:6.40-16.el7
  39. Complete!

解决

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

发表评论

表情:
评论列表 (有 0 条评论,140人围观)

还没有评论,来说两句吧...

相关阅读