简体   繁体   中英

Install Agda on OSX El Capitan?

I was trying to instal Agda on my mac, following the instructions http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.MacOSX

But I get some problems:

  1. When I typed cabal update in a Terminal window, it says Skipping download: Local and remote files match. I am not sure it means it worked or not.

  2. I can't find my .bash_profile file, so I don't know how to update my PATH variable .

  3. If I tried just skipping the first two steps above, typing cabal install happy alex directly, and it says the following:

     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 

    I think this means something failed, but I don't know what to do. Help please.

EDIT :

  1. If I type cabal install agda directly, it gives me the following error:

     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 

I would try building Agda with stack.

  1. Download stack for OSX using these instructions
  2. Run:

     stack setup stack install Agda 

Both steps might take a while. Watch the output to see where stack places the Agda programs - it probably will be something like ~/.local/bin

Update

Some explanation of the $PATH environment variable and how to set it:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM