Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CentOS 7 and Puppet unable to install nc

Tags:

I am having a weird issue with having puppet enforce the package nc.

I installed it manually in the end via: yum install nc

I see puppet does it via:
/usr/bin/yum -d 0 -e 0 -y list nc
Returns: Error: No matching Packages to list

I have tested this by command line as well:
yum list nc
Returns Error: No matching Packages to list

Yet, when I do:
yum install nc
Returns: Package 2:nmap-ncat-6.40-4.el7.x86_64 already installed and latest version

What am I missing?

like image 829
Werner Avatar asked Mar 14 '15 05:03

Werner


People also ask

How do I know if netcat is installed Linux?

Many mainstream Linux distributions come with Netcat already compiled and installed. Others have at least one or more versions of Netcat available as a pre-compiled package. To determine the version of Netcat, simply type nc –h or netcat –h. The original UNIX version will return a version line of [v1.

What package is netcat in?

Ncat is integrated with Nmap and is available in the standard Nmap download packages (including source code and Linux, Windows, and Mac binaries) available from the Nmap download page. You can also find it in our SVN source code repository.


2 Answers

Nc is a link to nmap-ncat.

It would be nice to use nmap-ncat in your puppet, because NC is a virtual name of nmap-ncat.

Puppet cannot understand the links/virtualnames

your puppet should be:

package {
  'nmap-ncat':
    ensure => installed;
}
like image 159
Vassilis Aretakis Avatar answered Sep 22 '22 13:09

Vassilis Aretakis


yum install nmap-ncat.x86_64

resolved my problem

like image 21
wonbin2011 Avatar answered Sep 22 '22 13:09

wonbin2011