奮闘・HDBC-postgresqlのインストール
Haskellのパッケージのインストールには本当に苦労します。毎回これで挫折するんですよね。
今回はHDBC-postgresqlをインストールしたいのですが、これがなかなか。
当方の環境がMacだからなのか、cabalでをインストールしようとしても失敗します。
やったこと。
sudo cabal install cabal
sudo cabal install alex happy
sudo cabal install HDBC-postgresql
出るエラー
最後のコマンドがエラーになり、インストールに失敗します。
Resolving dependencies... [1 of 1] Compiling Main ( /tmp/HDBC-postgresql-2.3.2.06336/HDBC-postgresql-2.3.2.0/Setup.hs, /tmp/HDBC-postgresql-2.3.2.06336/HDBC-postgresql-2.3.2.0/dist/setup/Main.o ) /tmp/HDBC-postgresql-2.3.2.06336/HDBC-postgresql-2.3.2.0/Setup.hs:3:1: Warning: In the use of `defaultUserHooks' (imported from Distribution.Simple): Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2 compatibility in which case you must stick with defaultUserHooks" /tmp/HDBC-postgresql-2.3.2.06336/HDBC-postgresql-2.3.2.0/Setup.hs:8:1: Warning: In the use of `findProgramOnPath' (imported from Distribution.Simple.Program): Deprecated: "use findProgramLocation instead" Linking /tmp/HDBC-postgresql-2.3.2.06336/HDBC-postgresql-2.3.2.0/dist/setup/setup ... ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog Warning: defaultUserHooks in Setup script is deprecated. Configuring HDBC-postgresql-2.3.2.0... setup: The program pgconfig is required but it could not be found. cabal: Error: some packages failed to install: HDBC-postgresql-2.3.2.0 failed during the configure step. The exception was: ExitFailure 1
パッケージのダウンロードは成功しているようですがセットアップに失敗している、と。
pgconfigというものが見付からないのが原因なのか、それともExitFailure 1というのが原因なのか・・・
エラーメッセージをGoogleで引いてみてもあまり情報が得られません。
萎えるやる気を奮い立たせたい
Haskell熱が高まっても、こんな感じでパッケージのインストールに失敗してやりたいことがやれず急速に熱が冷めていくのがいつものパターン。
でもこのハードルを超えると世界が広がると思うので、今回はもう少し粘ってみようと思います。