Not sure how to download netstat

I’m learning the command line by reading a tutorial. In the book the author uses the netstat program. I tried to use it but i get the message that it can’t be found. It shows me the package to install it, but when I try installing the package, an error message says that the package conflicts with one already installed. To download it I have to uninstall the other package. I’m not sure what to do.
I won’t be able to read your responses until tomorrow, but thanks for your help.

Here is the complete session with error messages:

The program ‘netstat’ can be found in following packages:

  • busybox-net-tools [ path: /bin/netstat, repository: zypp (repo-sle-update) ]
  • busybox-net-tools [ path: /usr/bin/netstat, repository: zypp (repo-sle-update) ]
  • net-tools-deprecated [ path: /bin/netstat, repository: zypp (repo-oss) ]
  • net-tools-deprecated [ path: /usr/bin/netstat, repository: zypp (repo-oss) ]

Try installing with:
sudo zypper install <selected_package>

user@localhost:~> zypper install busybox-net-tools
Root privileges are required to run this command.
user@localhost:~> sudo zypper install busybox-net-tools
[sudo] password for root:
Loading repository data…
Reading installed packages…
Resolving package dependencies…

Problem: the to be installed busybox-net-tools-1.35.0-150400.4.5.1.noarch conflicts with ‘net-tools’ provided by the installed net-tools-2.0+git20170221.479bb4a-3.11.x86_64
Solution 1: Following actions will be done:
deinstallation of net-tools-2.0+git20170221.479bb4a-3.11.x86_64
deinstallation of net-tools-lang-2.0+git20170221.479bb4a-3.11.noarch
Solution 2: do not install busybox-net-tools-1.35.0-150400.4.5.1.noarch

Choose from above solutions by number or cancel [1/2/c/d/?] (c):

Hi,

It seems you have previously installed net-tools from another repository. This conflicts with the package you try to install.

Kind regards,

Natasha

boven:~ # zypper se -si net-tools
System management is locked by the application with pid 9956 (/usr/bin/ruby.ruby2.5).
Close this application before trying again.
boven:~ # zypper se -si net-tools
Loading repository data...
Reading installed packages...

S  | Name                 | Type    | Version                      | Arch   | Repository
---+----------------------+---------+------------------------------+--------+-----------
i  | net-tools            | package | 2.0+git20170221.479bb4a-3.11 | x86_64 | Main (OSS)
i+ | net-tools-deprecated | package | 2.0+git20170221.479bb4a-3.11 | x86_64 | Main (OSS)
i  | net-tools-lang       | package | 2.0+git20170221.479bb4a-3.11 | noarch | Main (OSS)

    Note: For an extended search including not yet activated remote resources please use 'zypper
    search-packages'.
boven:~ #

So I have both packages installed without problems. And the tool netstat is part of the net-tools-deprecatedpackage.

@determined_suse_noob as recommended by @hcvv use the net-tools rather than busybox items.

But if you really want to learn, then convert the deprecated netstat command and use the ss command instead as that will be far more beneficial going forward…

4 Likes

Thanks for your response. After running that command it seems like I don’t have the deprecated package installed, which is the package that contains netstat. Any advise?

Here’s the log

user@localhost:~> sudo zypper se -si net-tools
[sudo] password for root:
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
–±---------------±--------±-----------------------------±-------±---------------
i | net-tools | package | 2.0+git20170221.479bb4a-3.11 | x86_64 | Main Repository
i | net-tools-lang | package | 2.0+git20170221.479bb4a-3.11 | noarch | Main Repository

Thanks again :slight_smile:

Oh I had no idea it had been deprecated. I wonder why. This is the first time I’ve heard of ss. I’ll use it from now on like you advised. I really only wanted to use the netstat tool to follow along with the tutorial. Thanks :slight_smile:

@determined_suse_noob I think the hint is deprecated in the package name :wink: Yes, use the netstat command for the tutorial, but along side that test the ss command also to compare results…

Okay will do. Thanks again