
I want to install package NetSNMP: > cabal install NetSNMP Resolving dependencies... Configuring NetSNMP-0.1.6... cabal: Missing dependency on a foreign library: * Missing C library: netsnmp This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal: Error: some packages failed to install: NetSNMP-0.1.6 failed during the configure step. The exception was: ExitFailure 1 Package net-mgmt/net-snmp already installed: > pkg_info | grep snmp net-snmp-5.5_4 An extendable SNMP implementation With options --extra-include-dirs= and --extra-lib-dirs= result is same: > cabal install NetSNMP --extra-include-dirs=/usr/local/include > --extra-lib-dirs=/usr/local/lib Resolving dependencies... Configuring NetSNMP-0.1.6... cabal: Missing dependency on a foreign library: * Missing C library: netsnmp This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. cabal: Error: some packages failed to install: NetSNMP-0.1.6 failed during the configure step. The exception was: ExitFailure 1 How to install NetSNMP package?

On Wed, 20 Jul 2011, Комар Максим wrote: > I want to install package NetSNMP: >> cabal install NetSNMP > Resolving dependencies... > Configuring NetSNMP-0.1.6... > cabal: Missing dependency on a foreign library: > * Missing C library: netsnmp > This problem can usually be solved by installing the system package that > provides this library (you may need the "-dev" version). If the library > is already installed but in a non-standard location then you can use > the flags --extra-include-dirs= and --extra-lib-dirs= to specify where > it is. cabal: Error: some packages failed to install: > NetSNMP-0.1.6 failed during the configure step. The exception was: > ExitFailure 1 > > Package net-mgmt/net-snmp already installed: >> pkg_info | grep snmp > net-snmp-5.5_4 An extendable SNMP implementation As Cabal tells, the developer files are needed, too, and are usually found in packages ending on '-dev' or '-devel', that is, in your case net-snmp-dev.

2011/7/20 Henning Thielemann
On Wed, 20 Jul 2011, Комар Максим wrote:
I want to install package NetSNMP:
cabal install NetSNMP
Resolving dependencies... Configuring NetSNMP-0.1.6... cabal: Missing dependency on a foreign library: * Missing C library: netsnmp
Package net-mgmt/net-snmp already installed:
pkg_info | grep snmp
net-snmp-5.5_4 An extendable SNMP implementation
As Cabal tells, the developer files are needed, too, and are usually found in packages ending on '-dev' or '-devel', that is, in your case net-snmp-dev.
Ports is build-from-source, so every package is what Linux calls a -dev package. The OP might need to make sure that cabal knows to look in /usr/local for libraries. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

On Wed, 20 Jul 2011, Brandon Allbery wrote:
Ports is build-from-source, so every package is what Linux calls a -dev package.
The OP might need to make sure that cabal knows to look in /usr/local for libraries.
I see. If net-snmp supports pkg-config then all such problems should be solvable by using the pkg-config support of Cabal. So you might run $ pkg-config --list-all on your machine, see whether net-smnp is listed, and if yes, encourage the author of NetSNMP bindings to use the PkgConfig field in his Cabal package description.
participants (3)
-
Brandon Allbery
-
Henning Thielemann
-
Комар Максим