簡體   English   中英

用Cabal安裝ghc-mod

[英]Installing `ghc-mod` with Cabal

cabal install ghc-mod似乎可以工作,但是當我嘗試cabal run ghc-mod ,出現以下錯誤:

Package has never been configured. Configuring with default flags. If this fails, please configure manually.
cabal: No cabal file found.
Please create a package description file <pkgname>.cabal

我發現的資源似乎建議安裝軟件包不需要創建軟件包描述文件。

有任何想法嗎?

如今,在Haskell上安裝東西的標准方法是在沙箱中。

轉到終端並創建一個空文件夾,其中將存放您的ghc-mod沙箱。 cd進入該文件夾,然后:

cabal sandbox init
cabal install ghc-mod

完成后,您將在.cabal-sandbox/bin找到所需的ghc-mod二進制文件。 由於它是靜態鏈接的,因此可以安全地將其移動到$ PATH中的某個位置。

我強烈建議您使用沙箱,但是如果您不想轉到主目錄中的.cabal,則會找到帶有bin的二進制文件

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM