码迷,mamicode.com
首页 > Windows程序 > 详细

Windows10下ghci无法使用的解决方案

时间:2018-10-12 21:10:48      阅读:21      评论:0      收藏:0      [点我收藏+]

标签:...   depend   env   rect   一个   location   none   try   not   

遇到的问题:在安装Haskell Platform Core 8.4.3版本后,在命令行中输入ghci,使用该交互环境时报错。

报错信息如下:省略号是一系列类似ghci去各种路径查找都没找到的信息

GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help : user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 193)) Whilst trying to load: (dynamic) pthread Additional directories searched: (none)

........

解决方案:似乎是因为系统中已经存在的Lilypond,当前的Haskell Platform与其不兼容。以下解决方案摘自Euterpea 有趣的是这是一个Haskell的音乐创作库,它竟然记录了如何解决这个看似需要在win10下安装pthread但实际上并非如此的bug。

Trying to start GHCi, WinGHCI, or running GHC fails with errors related to pthread.dll, such as: user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 193))

If you have Lilypond installed, this is unfortunately a known incompatibility with recent versions of Haskell Platform right now. There are only three ways to solve it for now:

Option 1: Remove Lilypond’s bin folder from your PATH environment variable. If you have a user path and a system path, you must remove Lilypond-related entries from BOTH, not just the user’s path. You may need to reboot for GHCi to work again. You should still be able to run the GUI for Lilypond by making a desktop shortcuts directly to Lilypad.exe. If using from command line, calling the executables with the full path to the containing folder. Unless you used a custom installation location, the Lilypad, lilypond, midi2ly, and other programs that come with Lilypond will be located in this folder:
C:\Program Files (x86)\LilyPond\usr\bin

Option 2: Use Haskell Platform 8.0.2a (core or full).

Option 3: Uninstall Lilypond. This is only recommended if it’s an old installation and you don’t plan on using it anymore. Otherwise, try option 1 first.

因为很久没有使用LilyPond,未来很可能也不会使用,就采用了第三种,直接卸载了LilyPond。问题解决。

Windows10下ghci无法使用的解决方案

标签:...   depend   env   rect   一个   location   none   try   not   

原文地址:https://www.cnblogs.com/heapheapstack/p/9780320.html

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!