问题描述
我试图安装 helm
。当我尝试安装它时,但是我得到这个错误:
$ cabal install helm
正在解析依赖关系...
配置sdl2-1.1.0 ...
cabal:pkg-config软件包的'sdl2'版本> = 2.0.3是必需的,但它可能不能找到
。
无法安装sdl2-1.1.0
cabal:错误:某些软件包未能安装:
helm-0.6.1取决于sdl2-1.1.0,无法安装。
sdl2-1.1.0在配置步骤中失败。例外情况是:
ExitFailure 1
当我自己安装sdl2时,类似的消息。
$ cabal install sdl2
正在解析依赖项...
配置sdl2-1.1。 0 ...
cabal:pkg-config软件包的'sdl2'版本> = 2.0.3是必需的,但它可能没有找到
。
未能安装sdl2-1.1.0
cabal:错误:某些软件包未能安装:
sdl2-1.1.0在配置步骤中失败。例外情况是:
ExitFailure 1
我不明白。根据Hackage的说法,sdl2版本为1.1,但是安装它需要2.0.3版本?我已经试过了这个进出沙箱。 ghc-pkg list
的结果在这里,如果您认为它们是相关的:
我在Ubuntu上使用btw。
帮助?
其他安装可能发生的事情(发生在我身上)是PKG_CONFIG_PATH变量可能不指向包配置文件(sdl2.pc,在/ usr / local / lib / pkgconfig目录中)。 pkg-config使用一些默认目录('/ usr / lib / pkgconfig'和'/ usr / share / pkgconfig'),但是如果sdl.pc文件不在其中之一,你必须指定目录在环境变量中。你可以用 echo $ PKG_CONFIG_PATH
如果事实证明你需要设置变量, code> export PKG_CONFIG_PATH = / usr / local / lib / pkgconfig (或者你的sdl2.pc文件所在的目录)
I am trying to install helm
. When I try to install it, however I get this error:
$ cabal install helm
Resolving dependencies...
Configuring sdl2-1.1.0...
cabal: The pkg-config package 'sdl2' version >=2.0.3 is required but it could
not be found.
Failed to install sdl2-1.1.0
cabal: Error: some packages failed to install:
helm-0.6.1 depends on sdl2-1.1.0 which failed to install.
sdl2-1.1.0 failed during the configure step. The exception was:
ExitFailure 1
When I go to install sdl2 by itself, I get a similar message.
$ cabal install sdl2
Resolving dependencies...
Configuring sdl2-1.1.0...
cabal: The pkg-config package 'sdl2' version >=2.0.3 is required but it could
not be found.
Failed to install sdl2-1.1.0
cabal: Error: some packages failed to install:
sdl2-1.1.0 failed during the configure step. The exception was:
ExitFailure 1
I don't understand. According to Hackage, sdl2 is at version 1.1, but installing it requires version 2.0.3? I've tried this in and out of a sandbox. Results of ghc-pkg list
are here if you think they're relevant: http://pastebin.com/tFrsfPFe
I'm on Ubuntu btw.
Help?
Another thing which could happen (happened to me) for other installs is that the PKG_CONFIG_PATH variable might not point to the package config file (sdl2.pc, for me in the /usr/local/lib/pkgconfig directory). pkg-config uses some default directories ('/usr/lib/pkgconfig' and '/usr/share/pkgconfig'), but if the sdl.pc file isn't in one of these, you'll have to specify the directory in the environment variable. You can check this with echo $PKG_CONFIG_PATH
If it turns out you need to set the variable, just use export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
(or to whatever directory your sdl2.pc file lives in)
这篇关于无法通过cabal安装sdl2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!