我正在嘗試在osx上安裝最新的happstack-server。他們只是增加了對libcryptopp的依賴,並且我無法工作。在osx上安裝happstack-server 6.5.3 - 缺少libcryptopp
~$ cabal install happstack-server
Resolving dependencies...
Configuring happstack-server-6.5.3...
cabal: Missing dependency on a foreign library:
* Missing C library: cryptopp
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:
happstack-server-6.5.3 failed during the configure step. The exception was:
ExitFailure 1
所以,後來我安裝libcryptopp與MacPorts的,這使libcryptopp.a在/ opt/local/lib目錄
sudo port install libcryptopp
然後我重新安裝happstack服務器與--extra-LIB-迪爾斯
cabal install happstack-server --extra-lib-dirs=/opt/local/lib
它安裝罰款,一切似乎工作,直到我真正運行一個happstack服務器。
~$ runhaskell Hello.hs
Hello.hs: <command line>: can't load .so/.DLL for: libcryptopp.dylib (dlopen(libcryptopp.dylib, 9): image not found)
我在做什麼錯?或者這是一個happstack的錯誤?在通過macports安裝lib之後,我甚至沒有.dylib,只有.a。
文件:happstack-server.cabal:
Flag https
Default: False
配置/編譯/ ghc --make Hello.hs
is even crazier
的'Hello.hs'錯誤可能是由於'iconv'庫的錯誤。我一直在忘記它,但我認爲這個系統不能和Haskell一起工作,你需要安裝macports'iconv'。或者相反。看起來,Mac有點混亂,因爲有很多不同的方式來安裝軟件包和它們去的地方。但是如果你明白了這一點,我聽到它很好用。 –