在OSX El Capitan上安装Agda?

时间:2016-07-04 02:26:53

标签: macos haskell cabal agda

我试图按照说明http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.MacOSX

在我的Mac上安装Agda

但我遇到了一些问题:

  1. 当我在终端窗口中输入cabal update时,它显示Skipping download: Local and remote files match.我不确定这是否有效。

  2. 我找不到我的.bash_profile文件,因此我不知道如何更新我的PATH variable

  3. 如果我尝试跳过上面的前两个步骤,请直接键入cabal install happy alex,并说明以下内容:

    Resolving dependencies...
    Configuring alex-3.1.7...
    Configuring happy-1.19.5...
    Building happy-1.19.5...
    Building alex-3.1.7...
    Failed to install happy-1.19.5
    Build log ( /Users/ChiuYenChao/.cabal/logs/happy-1.19.5.log ):
    [1 of 1] Compiling Main             ( /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-28407/happy-1.19.5/dist/setup/setup.hs, /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-28407/happy-1.19.5/dist/setup/Main.o )
    Linking /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-28407/happy-1.19.5/dist/setup/setup ...
    Configuring happy-1.19.5...
    Building happy-1.19.5...
    Preprocessing executable 'happy' for happy-1.19.5...
    <command line>: cannot satisfy -package-id mtl-2.2.1-7fee06b00eebbe3fa92f6d82f0fb6c19
        (use -v for more information)
    Failed to install alex-3.1.7
    Build log ( /Users/ChiuYenChao/.cabal/logs/alex-3.1.7.log ):
    [1 of 1] Compiling Main             ( /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-28406/alex-3.1.7/dist/setup/setup.hs, /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-28406/alex-3.1.7/dist/setup/Main.o )
    Linking /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-28406/alex-3.1.7/dist/setup/setup ...
    Configuring alex-3.1.7...
    Building alex-3.1.7...
    Preprocessing executable 'alex' for alex-3.1.7...
    <command line>: cannot satisfy -package-id QuickCheck-2.8.1-720f6faecb50e002ef05e66ef82b9675
        (use -v for more information)
    cabal: Error: some packages failed to install:
    alex-3.1.7 failed during the building phase. The exception was:
    ExitFailure 1
    happy-1.19.5 failed during the building phase. The exception was:
    ExitFailure 1
    

    我认为这意味着失败了,但我不知道该怎么做。请帮忙。

  4. 修改

    1. 如果我直接输入cabal install agda,则会出现以下错误:

      Resolving dependencies...
      Downloading EdisonAPI-1.3...
      Downloading QuickCheck-2.8.2...
      Configuring QuickCheck-2.8.2...
      Downloading STMonadTrans-0.3.3...
      Configuring EdisonAPI-1.3...
      Downloading boxes-0.1.4...
      Configuring boxes-0.1.4...
      Downloading data-hash-0.2.0.1...
      Downloading edit-distance-0.2.2.1...
      Configuring STMonadTrans-0.3.3...
      Downloading geniplate-mirror-0.7.4...
      Downloading hashtables-1.2.1.0...
      Downloading monadplus-1.4.2...
      Downloading polyparse-1.12...
      Downloading strict-0.3.2...
      Downloading unix-compat-0.4.2.0...
      Building boxes-0.1.4...
      Building QuickCheck-2.8.2...
      Building STMonadTrans-0.3.3...
      Failed to install QuickCheck-2.8.2
      Build log ( /Users/ChiuYenChao/.cabal/logs/QuickCheck-2.8.2.log ):
      [1 of 1] Compiling Main             ( /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-29102/QuickCheck-2.8.2/dist/setup/setup.hs, /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-29102/QuickCheck-2.8.2/dist/setup/Main.o )
      Linking /var/folders/bh/q7b8bhkj3bq8s6ml5zxvwfd40000gn/T/cabal-tmp-29102/QuickCheck-2.8.2/dist/setup/setup ...
      Configuring QuickCheck-2.8.2...
      Building QuickCheck-2.8.2...
      Preprocessing library QuickCheck-2.8.2...
      <command line>: cannot satisfy -package-id random-1.1-1229fa9ea3f9951a38fad637630a5acf
          (use -v for more information)
      Building EdisonAPI-1.3...
      Failed to install STMonadTrans-0.3.3
      Build log ( /Users/ChiuYenChao/.cabal/logs/STMonadTrans-0.3.3.log ):
      Configuring STMonadTrans-0.3.3...
      Building STMonadTrans-0.3.3...
      Preprocessing library STMonadTrans-0.3.3...
      <command line>: cannot satisfy -package-id mtl-2.2.1-7fee06b00eebbe3fa92f6d82f0fb6c19
          (use -v for more information)
      Failed to install boxes-0.1.4
      Build log ( /Users/ChiuYenChao/.cabal/logs/boxes-0.1.4.log ):
      Configuring boxes-0.1.4...
      Building boxes-0.1.4...
      Preprocessing library boxes-0.1.4...
      <command line>: cannot satisfy -package-id split-0.2.2-bdc181dc0cb027cda71092df3fe3fb02
          (use -v for more information)
      Configuring data-hash-0.2.0.1...
      Configuring edit-distance-0.2.2.1...
      Configuring geniplate-mirror-0.7.4...
      Configuring monadplus-1.4.2...
      Failed to install EdisonAPI-1.3
      Build log ( /Users/ChiuYenChao/.cabal/logs/EdisonAPI-1.3.log ):
      Configuring EdisonAPI-1.3...
      Building EdisonAPI-1.3...
      Preprocessing library EdisonAPI-1.3...
      <command line>: cannot satisfy -package-id mtl-2.2.1-7fee06b00eebbe3fa92f6d82f0fb6c19
          (use -v for more information)
      Building data-hash-0.2.0.1...
      Building edit-distance-0.2.2.1...
      Building geniplate-mirror-0.7.4...
      Building monadplus-1.4.2...
      Configuring hashtables-1.2.1.0...
      Failed to install edit-distance-0.2.2.1
      Build log ( /Users/ChiuYenChao/.cabal/logs/edit-distance-0.2.2.1.log ):
      Configuring edit-distance-0.2.2.1...
      Building edit-distance-0.2.2.1...
      Preprocessing library edit-distance-0.2.2.1...
      <command line>: cannot satisfy -package-id random-1.1-1229fa9ea3f9951a38fad637630a5acf
          (use -v for more information)
      Configuring unix-compat-0.4.2.0...
      Failed to install geniplate-mirror-0.7.4
      Build log ( /Users/ChiuYenChao/.cabal/logs/geniplate-mirror-0.7.4.log ):
      Configuring geniplate-mirror-0.7.4...
      Building geniplate-mirror-0.7.4...
      Preprocessing library geniplate-mirror-0.7.4...
      <command line>: cannot satisfy -package-id mtl-2.2.1-7fee06b00eebbe3fa92f6d82f0fb6c19
          (use -v for more information)
      Building unix-compat-0.4.2.0...
      Building hashtables-1.2.1.0...
      Configuring polyparse-1.12...
      Failed to install hashtables-1.2.1.0
      Build log ( /Users/ChiuYenChao/.cabal/logs/hashtables-1.2.1.0.log ):
      Configuring hashtables-1.2.1.0...
      Building hashtables-1.2.1.0...
      Preprocessing library hashtables-1.2.1.0...
      <command line>: cannot satisfy -package-id hashable-1.2.3.3-09c4177c49dd46a63f7036317bb17114
          (use -v for more information)
      Building polyparse-1.12...
      Configuring strict-0.3.2...
      Failed to install polyparse-1.12
      Build log ( /Users/ChiuYenChao/.cabal/logs/polyparse-1.12.log ):
      Configuring polyparse-1.12...
      Building polyparse-1.12...
      Preprocessing library polyparse-1.12...
      <command line>: cannot satisfy -package-id text-1.2.1.3-3718968f98d5614ccdc45c27d4e8b0a1
          (use -v for more information)
      Building strict-0.3.2...
      Installed monadplus-1.4.2
      Installed unix-compat-0.4.2.0
      Downloading filemanip-0.3.6.3...
      Configuring filemanip-0.3.6.3...
      Building filemanip-0.3.6.3...
      Failed to install filemanip-0.3.6.3
      Build log ( /Users/ChiuYenChao/.cabal/logs/filemanip-0.3.6.3.log ):
      Configuring filemanip-0.3.6.3...
      Building filemanip-0.3.6.3...
      Preprocessing library filemanip-0.3.6.3...
      <command line>: cannot satisfy -package-id mtl-2.2.1-7fee06b00eebbe3fa92f6d82f0fb6c19
          (use -v for more information)
      Installed data-hash-0.2.0.1
      Installed strict-0.3.2
      Updating documentation index
      /Users/ChiuYenChao/Library/Haskell/share/doc/x86_64-osx-ghc-7.10.2/index.html
      cabal: Error: some packages failed to install:
      Agda-2.5.1.1 depends on filemanip-0.3.6.3 which failed to install.
      EdisonAPI-1.3 failed during the building phase. The exception was:
      ExitFailure 1
      EdisonCore-1.3.1.1 depends on EdisonAPI-1.3 which failed to install.
      QuickCheck-2.8.2 failed during the building phase. The exception was:
      ExitFailure 1
      STMonadTrans-0.3.3 failed during the building phase. The exception was:
      ExitFailure 1
      boxes-0.1.4 failed during the building phase. The exception was:
      ExitFailure 1
      cpphs-1.20.1 depends on polyparse-1.12 which failed to install.
      edit-distance-0.2.2.1 failed during the building phase. The exception was:
      ExitFailure 1
      equivalence-0.3.1 depends on STMonadTrans-0.3.3 which failed to install.
      filemanip-0.3.6.3 failed during the building phase. The exception was:
      ExitFailure 1
      geniplate-mirror-0.7.4 failed during the building phase. The exception was:
      ExitFailure 1
      hashtables-1.2.1.0 failed during the building phase. The exception was:
      ExitFailure 1
      haskell-src-exts-1.17.1 depends on polyparse-1.12 which failed to install.
      polyparse-1.12 failed during the building phase. The exception was:
      ExitFailure 1
      

2 个答案:

答案 0 :(得分:4)

我会尝试用堆栈构建Agda。

  1. 使用these instructions
  2. 下载stack for OSX
  3. 执行命令

    stack setup
    stack install Agda
    
  4. 这两个步骤可能需要一段时间。观察输出以查看堆栈放置Agda程序的位置 - 它可能类似于~/.local/bin

    <强>更新

    $ PATH环境变量的一些解释以及如何设置它:

答案 1 :(得分:0)

多次失败之后,我只是卸载旧版本的Haskell并重新安装它,然后http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.MacOSX方法运行良好......