前提・実現したいこと
Haskell での Web アプリケーションの作成の勉強を始めたばかりです。
かなり序盤の部分で詰まっていて、まだ Haskell のソースコードを弄っていない段階です。
やろうとしていることとしては Yesod を使った Web アプリケーションの開発です。
Stack でパッケージ管理をしています。
環境は WSL の Ubuntu 上での開発です。
データベースは mysql を使おうとしています。
(バージョンに関しては下記補足情報にて)
現在の状況としては、stack のインストール完了、yesod-mysql のプロジェクトを作成、Yesod のインストールまでです。
次にプロジェクトをビルドしようとしたときにエラーが発生しています。
発生している問題・エラーメッセージ
mysql-0.1.6
と pcre-light-0.4.0.4
という2つのパッケージのビルド中にエラーが発生しています。
-- While building package mysql-0.1.6 using: Process exited with code: ExitFailure 1 -- While building package pcre-light-0.4.0.4 using: Process exited with code: ExitFailure 1
修正依頼にてご指摘いただいた通り、ビルド時の出力にエラーメッセージが出ていたため、編集にて追記します。
mysql > configure mysql > [1 of 2] Compiling Main ( /tmp/stack16110/mysql-0.1.6/Setup.hs, /tmp/stack16110/mysql-0.1.6/.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/setup/Main.o ) mysql > [2 of 2] Compiling StackSetupShim ( /home/nerianighthawk/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack16110/mysql-0.1.6/.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/setup/StackSetupShim.o ) mysql > Linking /tmp/stack16110/mysql-0.1.6/.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/setup/setup ... mysql > Configuring mysql-0.1.6... mysql > setup: Missing dependencies on foreign libraries: mysql > * Missing (or bad) C libraries: ssl, crypto mysql > This problem can usually be solved by installing the system packages that mysql > provide these libraries (you may need the "-dev" versions). If the libraries mysql > are already installed but in a non-standard location then you can use the mysql > flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.If mysql > the library files do exist, it may contain errors that are caught by the C mysql > compiler at the preprocessing stage. In this case you can re-run configure mysql > with the verbosity flag -v3 to see the error messages. mysql > pcre-light > configure pcre-light > Configuring pcre-light-0.4.0.4... pcre-light > Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4: The program 'pkg-config' version pcre-light > >=0.9.0 is required but the version of /mnt/c/Strawberry/perl/bin/pkg-config pcre-light > could not be determined. pcre-light >
mysql 側はCライブラリが足りないもしくは参照先がおかしいとなっており、pcre-light はバージョン指定がおかしいのでしょうか?
どのように対処していいのかわからないので、対応方法を教えていただきたく思います。
よろしくお願いいたします。
該当のソースコード
ソースコードは書いていません。
stack new [プロジェクト名] yesod-mysql
コマンドで生成されたプロジェクトに対する操作です。
試したこと
stack upgrade
をしましたが、最新でした。
補足情報(FW/ツールのバージョンなど)
$ stack Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic
Yesod: 1.6
回答2件
あなたの回答
tips
プレビュー