Linux nc appears protocol not available error

Recently, when I was tinkering with the Linux nc (netcat) command and executing nc -l 1567 to listen, I encountered the "protocol not available" error. After thinking for a long time, I finally found a viable solution:

  1. First, remove the installed nc:

yum erase nc

  1. Download the .rpm file of a lower version of nc:


  1. Install the .rpm file:

rpm   -iUv    nc-1.84-22.el6.x86_64.rpm

After executing the above steps, check if nc is installed properly, and then try executing nc -l 1567. 1567 is the port number, which can be freely specified within a certain range.

Problem analysis: After searching for information and tinkering for a long time, it seems that the newer version of nc has a bug. Therefore, I chose to downgrade the version to solve this issue. Of course, if there are any experts who have better solutions, please feel free to comment below and provide your solutions or suggestions. Thank you. ---------- The Linux system I am using is CentOS-6.4-x86_64-minimal.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.