質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Haskell

Haskellは高い機能性をもった関数型プログラミング言語で、他の手続き型プログラミング言語では難しいとされている関数でも容易に行うことができます。強い静的型付け、遅延評価などに対応しています。

Q&A

解決済

1回答

738閲覧

YesodでQuick Startを実行したがエラーが出る

apo

総合スコア349

Haskell

Haskellは高い機能性をもった関数型プログラミング言語で、他の手続き型プログラミング言語では難しいとされている関数でも容易に行うことができます。強い静的型付け、遅延評価などに対応しています。

0グッド

0クリップ

投稿2019/01/17 12:27

前提・実現したいこと

YesodのQuick Startを実行したい。

Yesod quick start guideの通りに実行しているが、エラーが発生する。

stack new my-project yesod-sqlite && cd my-project stack install yesod-bin --install-ghc -- ここでエラー発生 stack build stack exec -- yesod devel

発生している問題・エラーメッセージ

"stack install yesod-bin"実行時に下記エラーが発生する。

[apo@localhost my-project]$ stack install yesod-bin --install-ghc zlib-0.6.2: configure Progress 1/11 -- While building package zlib-0.6.2 using: /home/apo/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 configure --with-ghc=/home/apo/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc --with-ghc-pkg=/home/apo/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/pkgdb --libdir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/lib --bindir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/bin --datadir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/share --libexecdir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/libexec --sysconfdir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/etc --docdir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/doc/zlib-0.6.2 --htmldir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/doc/zlib-0.6.2 --haddockdir=/home/apo/.stack/snapshots/x86_64-linux/lts-12.26/8.4.4/doc/zlib-0.6.2 --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 Process exited with code: ExitFailure 1 Logs have been written to: /home/apo/doc/dev/making/haskell/hs_yesod/my-project/.stack-work/logs/zlib-0.6.2.log Configuring zlib-0.6.2... Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4: Missing dependency on a foreign library: * Missing (or bad) header file: zlib.h * Missing (or bad) C library: z 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.If the library file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. If the header file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages.

該当のソースコード

テンプレートのまま。

stack.yaml

Haskell

1# This file was automatically generated by 'stack init' 2# 3# Some commonly used options have been documented as comments in this file. 4# For advanced use and comprehensive documentation of the format, please see: 5# https://docs.haskellstack.org/en/stable/yaml_configuration/ 6 7# Resolver to choose a 'specific' stackage snapshot or a compiler version. 8# A snapshot resolver dictates the compiler version and the set of packages 9# to be used for project dependencies. For example: 10# 11# resolver: lts-3.5 12# resolver: nightly-2015-09-21 13# resolver: ghc-7.10.2 14# 15# The location of a snapshot can be provided as a file or url. Stack assumes 16# a snapshot provided as a file might change, whereas a url resource does not. 17# 18# resolver: ./custom-snapshot.yaml 19# resolver: https://example.com/snapshots/2018-01-01.yaml 20resolver: lts-12.26 21 22# User packages to be built. 23# Various formats can be used as shown in the example below. 24# 25# packages: 26# - some-directory 27# - https://example.com/foo/bar/baz-0.0.2.tar.gz 28# - location: 29# git: https://github.com/commercialhaskell/stack.git 30# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a 31# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a 32# subdirs: 33# - auto-update 34# - wai 35packages: 36- . 37# Dependency packages to be pulled from upstream that are not in the resolver 38# using the same syntax as the packages field. 39# (e.g., acme-missiles-0.3) 40# extra-deps: [] 41 42# Override default flag values for local packages and extra-deps 43# flags: {} 44 45# Extra package databases containing global packages 46# extra-package-dbs: [] 47 48# Control whether we use the GHC we find on the path 49# system-ghc: true 50# 51# Require a specific version of stack, using version ranges 52# require-stack-version: -any # Default 53# require-stack-version: ">=1.9" 54# 55# Override the architecture used by stack, especially useful on Windows 56# arch: i386 57# arch: x86_64 58# 59# Extra directories used by stack for building 60# extra-include-dirs: [/path/to/dir] 61# extra-lib-dirs: [/path/to/dir] 62# 63# Allow a newer minor version of GHC than the snapshot specifies 64# compiler-check: newer-minor 65

試したこと

下記を実行 → 変わらず

yum remove zlib yum install zlib

ltsの変更 → 変わらず

補足情報(FW/ツールのバージョンなど)

OS:CentOS7 64bit
stack:1.9.3

ご教示よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

yum install zlib-devel(zlib-devかも)をやるといけるやつだと思います。

投稿2019/01/17 14:08

set0gut1

総合スコア2413

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

apo

2019/01/17 23:06

すごい!動きました。 以前はこんなコマンド打たなくても動いたのですが。。。 ありがとうございます!!
set0gut1

2019/01/17 23:10

おめでとうございます! :+1:
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問