Tôi đang cố gắng cài đặt máy chủ happstack mới nhất trên osx. Họ chỉ thêm một phụ thuộc vào libcryptopp, và tôi không thể làm cho nó hoạt động.Cài đặt happstack-server 6.5.3 trên osx - thiếu 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
Vì vậy, sau đó tôi cài đặt libcryptopp với macports, trong đó đặt libcryptopp.a trong/opt/local/lib
sudo port install libcryptopp
Sau đó, tôi cài đặt happstack-server lại với --extra-lib-dirs
cabal install happstack-server --extra-lib-dirs=/opt/local/lib
Nó cài đặt tốt, mọi thứ dường như làm việc cho đến khi tôi thực sự chạy một happstack máy chủ.
~$ runhaskell Hello.hs
Hello.hs: <command line>: can't load .so/.DLL for: libcryptopp.dylib (dlopen(libcryptopp.dylib, 9): image not found)
Tôi đang làm gì sai? Hay đây là một lỗi với happstack? Tôi thậm chí không có .dylib sau khi cài đặt lib qua macports, chỉ a .a. ghc --make Hello.hs
is even crazier
Lệnh 'Hello.hs' lỗi có lẽ do thư viện 'iconv' sai. Tôi quên rằng, nhưng tôi nghĩ rằng hệ thống một không làm việc với Haskell, bạn cần phải cài đặt macports 'iconv'. Hoặc đường vòng khác. Mac là một chút lộn xộn bởi vì có rất nhiều cách khác nhau để cài đặt các gói và địa điểm nơi họ đi, có vẻ như. Nhưng nếu bạn tìm ra điều đó, tôi nghe nó hoạt động tốt. –