2017-09-29 16 views
1

私はhaskell stackをインストールしましたが、同じghcを設定しようとしています。ghc健全性チェックエラーが発生しました。セットアップ時にghc-8.2.1が使用されました。4239

> stack setup 
The GHC located at /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.2.1/bin/ghc failed to compile a sanity check. Please see: 

http://docs.haskellstack.org/en/stable/install_and_upgrade/ 

for more information. Exception was: 
Running /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.2.1/bin/ghc /tmp/stack-sanity-check6389/Main.hs -no-user-package-db in directory /tmp/stack-sanity-check6389/ exited with ExitFailure 1 

[1 of 1] Compiling Main    (/tmp/stack-sanity-check6389/Main.hs, /tmp/stack-sanity-check6389/Main.o) 
Linking /tmp/stack-sanity-check6389/Main ... 

/usr/bin/ld.bfd: cannot find -lgmp 
collect2: error: ld returned 1 exit status 
`gcc' failed in phase `Linker'. (Exit code: 1) 
- スタックバージョンは、私はその後、私は stack setupコマンドを実行し、以下のエラーを得た

# This is the implicit global project's config file, which is only used when 
# 'stack' is run outside of a real project. Settings here do _not_ act as 
# defaults for all projects. To change stack's default settings, edit 
# '/home/rajkumar/.stack/config.yaml' instead. 
# 
# For more information about stack's configuration, see 
# http://docs.haskellstack.org/en/stable/yaml_configuration/ 
# 
flags: {} 
extra-package-dbs: [] 
packages: [] 
extra-deps: [] 
resolver: ghc-8.2.1 

以下のように〜/ .STACK /グローバル・プロジェクト/ stack.yamlを更新しました

stack --version 
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1 

です

この問題を解決するにはどうすればよいですか?

+0

スタックはどのようにインストールされましたか? https://docs.haskellstack.org/en/stable/README/からインストールする場合、libgmpをインストールする必要があります。 opensuseに物をインストールする方法は不明ですが、libgmpをインストールするとうまくいくはずです。私はちょうどスタック問題トラッカーを検索することでこれを理解しました.. https://github.com/commercialhaskell/stack/issues/3069 https://github.com/commercialhaskell/stack/search?q=lgmp&type=Issues&utf8= %E2%9C%93 – mgsloan

+0

mgsloan - コマンド 'curl -sSL https://get.haskellstack.org/を使用してインストールしました。 。私はこの文書に続いてhttps://docs.haskellstack.org/en/stable/README/#how-to-install –

答えて

0

このエラーを解決できました。

gmpがopensuse linuxに既にインストールされていることを確認するには、下記のコマンドを使用します。

sudo ldconfig -p | grep libgmp 
libgmp.so.10 (libc6,x86-64) => /usr/lib64/libgmp.so.10 

同じフォルダ内のlibファイルのリンクを作成するコマンドの下に

sudo zypper install libgmp10 

を使用してインストール存在しない場合。例

sudo ln /usr/lib64/libgmp.so.10 /usr/lib64/libgmp.so 

これは誰かにとって役立ちます。

関連する問題