Я пытался установить happstack-server-tls
пакет через Cabal в Arch Linux (3.12.9), но получил эту ошибку:
Resolving dependencies...
Configuring happstack-server-tls-7.1.0...
Failed to install happstack-server-tls-7.1.0
Last 10 lines of the build log ( /home/boris/.cabal/logs/happstack-server-tls-7.1.0.log ):
Configuring happstack-server-tls-7.1.0...
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
setup-Cabal-1.16.0-x86_64-linux-ghc-7.6.3: 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-tls-7.1.0 failed during the configure step. The exception
was:
ExitFailure 1
Увидев это сообщение об ошибке в первый раз, я установил crypto++
через Pacman. Но это не помогло мне.
Я даже попробовал это:
$ whereis libcryptopp.a
libcryptopp: /usr/lib/libcryptopp.so
$ cabal install happstack-server-tls --extra-include-dirs=/usr/lib/ --extra-lib-dirs=/usr/lib/
Но все равно не повезло.
Я проверил, работает ли crypto ++ lib с этим файлом test.cpp:
#include <iostream>
using std::cout;
using std::endl;
#include "cryptopp/integer.h"using CryptoPP::Integer;
int main( int, char** ) {
Integer i;
cout << "i: " << i << endl;
return 0;
}
И с g++ -g3 -ggdb -O0 -Wall -Wextra -Wno-unused -o test test.cpp -lcryptopp -pthread
test.cpp скомпилирован хорошо.
Тогда я попытался
$ cd /usr/lib
$ g++ -fpic -nostartfiles -nostdlib -shared libcryptopp.so -o libcryptopp.dylib
Но опять же все равно не повезло.
Кто-нибудь сталкивался с этой проблемой? Есть ли какие-то решения?
бежать cabal unpack happstack-server-tls
получить и распаковать исходный код в локальном каталоге. Затем отредактируйте happstack-server-tls.cabal
и попробуйте удалить эти строки:
if !os(darwin)
Extra-Libraries: cryptopp
Других решений пока нет …