试图安装cabal包sdl-mpeg找不到包含文件smpeg.h

non*_*ont 2 haskell sdl mpeg

运行"cabal install sdl-mpeg"

$  ls -l /usr/include/smpeg/smpeg.h 
-rw-r--r-- 1 root root 7503 2008-11-05 18:07 /usr/include/smpeg/smpeg.h
$ cabal install sdl-mpeg
Resolving dependencies...
Configuring SDL-mpeg-0.0.1...
cabal: Missing dependency on a foreign library:
* Missing header file: smpeg.h
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:
SDL-mpeg-0.0.1 failed during the configure step. The exception was:
exit: ExitFailure 1
Run Code Online (Sandbox Code Playgroud)

我尝试使用--extra-include-dirs =/usr/include/smpeg并在〜/ .cabal/config中设置相同,但无济于事.我甚至尝试在/ usr/include中链接smpeg.h.

我正在运行Ubuntu 9.10 Karmic Koala

Joe*_*Joe 5

使用"cabal -v3",我找到了一个解决方案:

sudo apt-get install libsmpeg-dev
cabal --extra-include-dirs=/usr/include/smpeg --extra-include-dirs=/usr/include/SDL install sdl-mpeg
Run Code Online (Sandbox Code Playgroud)