在尝试使用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不是我的计算机名称。帮助?
Coputer使用Chakra GNU/Linux 64位英特尔i7-230 CPU
发布于 2016-03-13 14:00:45
因此,当您使用root-cmd安装时,它会调用following路径:
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失败。为什么会出现这种情况显然与系统有关,但可以通过尝试相关代码片段来进一步调查……
https://stackoverflow.com/questions/24333304
复制相似问题