我想通過使用「cabal install sdl-mixer」來安裝SDL混音器haskell軟件包。 當我這樣做,它給人的錯誤Haskell SDL混音器編譯錯誤
Resolving dependencies...
[1 of 1] Compiling Main (/tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1/Setup.lhs, /tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1/dist/setup/Main.o)
Linking /tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1/dist/setup/setup ...
Configuring SDL-mixer-0.6.1...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for sdl-config... /usr/bin/sdl-config
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Failed to install SDL-mixer-0.6.1
cabal: Error: some packages failed to install:
SDL-mixer-0.6.1 failed during the configure step. The exception was:
ExitFailure 77
如果它的確與衆不同,我對Arch Linux的。我該如何安裝這個軟件包?
包裝上有一個'configure'腳本,即不承認'--with-gcc'選項。 C編譯器(gcc)似乎不適用於'configure'腳本。你可以在'cabal install'之前嘗試設置'CC'環境變量'$ export CC =「/ path/to/your/gcc」',但如果'--with-gcc'選項沒有被傳遞你卻被'cabal'自動添加,這不太可能有幫助。您可以'cabal unpack SDL-mixer',並在其目錄下運行'cabal install -v2'(或者您需要'-v3')來獲取命令行'cabal'用於'configure'。然後自己運行並查看'config.log'。 –