![](/img/trans.png)
[英]Cabal install (Cabal cabal-install) fails due to missing zlib library
[英]cabal zlib installation fails
在嘗試使用cabal安裝zlib軟件包時,使用以下命令:
cabal install --root-cmd=sudo --global zlib
安裝失敗並顯示以下消息:
In-place registering zlib-0.5.4.1...
cabal: Error: some packages failed to install:
zlib-0.5.4.1 failed during the final install step. The exception was:
user error (Unable to find cabal executable at: /home/manu2/.cabal/bin/cabal)
顯然,manu2不是我的電腦名。 救命?
計算機使用Chakra GNU / Linux 64位intel i7-230 CPU
因此,當您使用root-cmd進行安裝時,它會調用以下路徑:
reexec cmd = do
-- look for our own executable file and re-exec ourselves using a helper
-- program like sudo to elevate privileges:
self <- getExecutablePath
weExist <- doesFileExist self
if weExist
then inDir workingDir $
rawSystemExit verbosity cmd
[self, "install", "--only"
,"--verbose=" ++ showForCabal verbosity]
else die $ "Unable to find cabal executable at: " ++ self
因此,可執行路徑以某種方式解析為/home/manu2/.cabal/bin/cabal
但隨后在該路徑上調用doesFileExist
失敗。 為什么會出現這種情況顯然是系統依賴的,但只需嘗試相關代碼的片段就可以進一步調查......
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.