banner
李大仁博客

李大仁博客

天地虽大,但有一念向善,心存良知,虽凡夫俗子,皆可为圣贤。

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:

           wget   http://vault.centos.org/6.6/os/x86\_64/Packages/nc-1.84-22.el6.x86\_64.rpm

  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.

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