首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装带有C依赖项的Haskell包时出现问题(glpk)

安装带有C依赖项的Haskell包时出现问题(glpk)
EN

Stack Overflow用户
提问于 2020-10-12 07:28:09
回答 1查看 45关注 0票数 1

Haskell包Numeric.LinearProgramming依赖于C库glpk。在Ubuntu18.04上尝试使用命令cabal install hmatrix-glpk-0.19.0.0安装时,出现以下错误:

代码语言:javascript
复制
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

我在标准的spot (由APT) /usr/share/doc/glpk-utils/中安装了glpk-utils,但按照建议,我尝试添加--extra.../path to glpk-utils标签,但失败了,并显示了相同的消息。

这里会有什么问题呢?glpk-utils是正确的软件包安装吗?它对阴谋集团是不可见的吗?还有别的吗?

EN

回答 1

Stack Overflow用户

发布于 2020-10-12 20:11:54

您需要安装libglpk-dev包。

关于libglpk (glpk-utils需要)和libglpk-dev的区别,可以参考https://askubuntu.com/questions/1008912/whats-the-difference-between-dev-package-and-ordinary-package。通常,Haskell FFI需要错误消息中提到的-dev包。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64309982

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档