How to install libpcap-devel on SUSE Enterprise

installationsles

I'm new to SUSE and do not understand how to install packages with zypper. Or, rather, I understand you use the "install" subcommand, but it frequently can't find what I'm looking for.

For example, I need libpcap-devel to get the pcap.h headers and the linkable library. The SUSE website says that the package is available, but it doesn't show ups hen I try to install. Meanwhile zypper says it is installed, but the .h file isn't there:

$ sudo zypper install libpcap-dev
Refreshing service 'nu_novell_com'.
Loading repository data...
Reading installed packages...
'libpcap-dev' not found.
Resolving package dependencies...

Nothing to do.
$ sudo zypper search pcap
Refreshing service 'nu_novell_com'.
Loading repository data...
Reading installed packages...

S | Name            | Summary                        | Type      
--+-----------------+--------------------------------+-----------
  | libpcap         | A Library for Network Sniffers | srcpackage
i | libpcap0        | A Library for Network Sniffers | package   
i | slessp1-libpcap | Recommended update for libpcap | patch     
$ sudo zypper install libpcap
Refreshing service 'nu_novell_com'.
Loading repository data...
Reading installed packages...
'libpcap0' providing 'libpcap' is already installed.
Resolving package dependencies...

Suggestions?

Best Answer

I am suspicious of your nu_novell_com repository. That repository is used by SuSE Linux Enterprise, not openSUSE. Also, the fact you have slessp1-libpcap installed is further evidence you're using an SLE repository not an openSUSE one.

If that's the case, you're using the wrong repo, I'm not terribly surprised you're having problems.

The openSUSE repo for 12.1 (the version you linked to) can be added via:

zypper ar http://download.opensuse.org/distribution/12.1/repo/oss/ OpenSUSE-12.1-OSS
zypper ref

That'll add the repository and refresh it to ensure it has the package list updated. That should help you get at the right libraries for your installation.


Since you are running SLES, you can find out what files did come along with that libpcap0 package through:

rpm -ql libpcap0

Which will give you a list of files. Maybe the .h files you're looking for were stashed some place weird.

Also, you may want to give some thought to looking in the SLE11 SDK. It also has a libpcap0 package, though I'm not 100% sure since I no longer have a licensed SLES install so I can look :P.