2

私は途方に暮れています。OS X 10.8.2 を使用しています。

私が見つけることができる唯一の参照はこれです:

  • 4.1 パッケージをインストールしましたが、パッケージが見つかりません`


  • これは、パッケージをグローバルにインストールし、以前のパッケージがローカルにインストールされている場合に発生します。cabal-install
    はデフォルトでローカルにインストールされ、「runhaskell Setup」コマンド
    はデフォルトでグローバルにインストールされることに注意してください。

cabal はデフォルトでローカルにインストールするように設定されています。私はこれを変更していません。Haskell はグローバルにインストールされました。

$ cabal install pointfree
Resolving dependencies...
Configuring pointfree-1.0.4.3...
Building pointfree-1.0.4.3...
Preprocessing executable 'pointfree' for pointfree-1.0.4.3...
[1 of 7] Compiling Plugin.Pl.Common ( Plugin/Pl/Common.hs, dist/build/pointfree/pointfree-tmp/Plugin/Pl/Common.o )
[2 of 7] Compiling Plugin.Pl.Parser ( Plugin/Pl/Parser.hs, dist/build/pointfree/pointfree-tmp/Plugin/Pl/Parser.o )
[3 of 7] Compiling Plugin.Pl.PrettyPrinter ( Plugin/Pl/PrettyPrinter.hs, dist/build/pointfree/pointfree-tmp/Plugin/Pl/PrettyPrinter.o )
[4 of 7] Compiling Plugin.Pl.Transform ( Plugin/Pl/Transform.hs, dist/build/pointfree/pointfree-tmp/Plugin/Pl/Transform.o )
[5 of 7] Compiling Plugin.Pl.Rules  ( Plugin/Pl/Rules.hs, dist/build/pointfree/pointfree-tmp/Plugin/Pl/Rules.o )
[6 of 7] Compiling Plugin.Pl.Optimize ( Plugin/Pl/Optimize.hs, dist/build/pointfree/pointfree-tmp/Plugin/Pl/Optimize.o )
[7 of 7] Compiling Main             ( Main.hs, dist/build/pointfree/pointfree-tmp/Main.o )
Linking dist/build/pointfree/pointfree ...
Warning: No documentation was generated as this package does not contain a
library. Perhaps you want to use the --executables flag.
Installing executable(s) in
/Users/beoliver/Library/Haskell/ghc-7.4.2/lib/pointfree-1.0.4.3/bin
Installed pointfree-1.0.4.3
Updating documentation index /Users/beoliver/Library/Haskell/doc/index.html

$ cat ~/.bash_profile
export PATH="$HOME/Library/Haskell/bin:$PATH"


$ ls -l ~/Library/Haskell/bin/
total 24
lrwxr-xr-x  1 beoliver  staff  49 Dec 28 16:06 cabal -> ../ghc-7.4.2/lib/cabal-install-1.16.0.2/bin/cabal
lrwxr-xr-x  1 beoliver  staff  48 Dec 28 19:52 pointfree -> ../ghc-7.4.2/lib/pointfree-1.0.4.3/bin/pointfree
-rw-r--r--  1 beoliver  staff  66 Dec 28 19:53 x

×がおかしい…

$ cat ~/Library/Haskell/bin/x
(line 1, column 5):
unexpected "+"
expecting space or simple term

うーん

確認ghc-pkg listしましたがありません。それで、それがuserパッケージであるかどうかを確認してください。

$ ls ~/Library/Haskell/ghc-7.4.2/lib/
Cabal-1.16.0.3      cabal-install-1.16.0.2  pointfree-1.0.4.3

$ file pointfree-1.0.4.3/bin/pointfree 
pointfree-1.0.4.3/bin/pointfree: Mach-O 64-bit executable x86_64

$ ghc-pkg list --user
/Users/beoliver/.ghc/x86_64-darwin-7.4.2/package.conf.d
   Cabal-1.16.0.3
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0.3 of the Cabal library 

ここにフラグがありませんか?私はまだそれを構築する必要がありますか?

$ ghc-pkg check
Warning: haddock-interfaces: /Library/Haskell/ghc-7.4.2/lib/haskell-platform-2012.4.0.0/doc/html/haskell-platform.haddock doesn't exist or isn't a file
Warning: haddock-html: /Library/Haskell/ghc-7.4.2/lib/haskell-platform-2012.4.0.0/doc/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /Library/Haskell/ghc-7.4.2/lib/GLUT-2.1.2.1/doc/html/GLUT.haddock doesn't exist or isn't a file
4

2 に答える 2

2

確認ghc-pkg listしましたがありません。

ghc-pkgインストールされたライブラリのみを認識し、気にします。pointfreeライブラリを伴わない実行可能ファイルであるため、それghc-pkgについてはわかりません。

$HOME/Library/Haskell/binにあり、実行可能ファイルがそこにリンクされているためPATH、コマンドラインから簡単に実行できます

$ pointfree "\f x y -> f y x"
flip

(またはそのようなもの、pointfreeで遊んでから長い時間が経ちました)。

×がおかしい…

からの解析エラー メッセージのようparsecです。ただし、そのファイルに何が書き込まれたのかはわかりません。

$ ghc-pkg check
Warning: haddock-interfaces: /Library/Haskell/ghc-7.4.2/lib/haskell-platform-2012.4.0.0/doc/html/haskell-platform.haddock doesn't exist or isn't a file
Warning: haddock-html: /Library/Haskell/ghc-7.4.2/lib/haskell-platform-2012.4.0.0/doc/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /Library/Haskell/ghc-7.4.2/lib/GLUT-2.1.2.1/doc/html/GLUT.haddock doesn't exist or isn't a file

何かがハドックを踏みにじったか、最初から適切にインストールされていなかったようです。これ実際の問題を示している可能性がありますが、ローカルのドキュメントが必要ない場合は、おそらく無視できます。

于 2012-12-28T20:56:44.653 に答える
1

.cabal パッケージのバイナリが に見つかりました~/.cabal/bin/

于 2016-10-19T20:22:50.747 に答える