如何解决安装具有C依赖项glpk的Haskell软件包时出现问题
Haskell软件包content: "●"
取决于C库Numeric.LinearProgramming
。在Ubuntu 18.04上使用命令glpk
尝试安装时,出现以下错误:
cabal install hmatrix-glpk-0.19.0.0
我在{APT} Resolving dependencies...
Notice: installing into a sandbox located at /home/owen/.cabal-sandbox
Configuring hmatrix-glpk-0.19.0.0...
Failed to install hmatrix-glpk-0.19.0.0
Build log ( /home/owen/.cabal-sandbox/logs/hmatrix-glpk-0.19.0.0.log ):
cabal: Entering directory '/tmp/cabal-tmp-7470/hmatrix-glpk-0.19.0.0'
Configuring hmatrix-glpk-0.19.0.0...
cabal: Missing dependency on a foreign library:
*Missing C library: glpk
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: Leaving directory '/tmp/cabal-tmp-7470/hmatrix-glpk-0.19.0.0'
cabal: Error: some packages failed to install:
hmatrix-glpk-0.19.0.0 failed during the configure step. The exception was:
ExitFailure 1
的标准位置中安装了glpk-utils
,但根据建议,我尝试添加/usr/share/doc/glpk-utils/
标签,但失败,并显示相同的消息。
这里可能是什么问题? --extra.../path to glpk-utils
是否正确安装了软件包? Cabal不可见吗?还有吗?
解决方法
您需要安装libglpk-dev
软件包。
对于libglpk
(glpk-utils
必需)和libglpk-dev
之间的区别,
例如,请参阅https://askubuntu.com/questions/1008912/whats-the-difference-between-dev-package-and-ordinary-package。
通常,Haskell FFI需要-dev
软件包,如错误消息中所述。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。