如何在删除.cabal后重新安装pandoc?

时间:2015-06-06 19:22:12

标签: r pandoc

我错误地从我的root directoty中删除了/root/.cabal/,当我尝试重新安装它时,我得到了这个输出:

faiz:~$ sudo cabal install pandoc --reinstall
Resolving dependencies...
In order, the following will be installed:
pandoc-1.14.0.4 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
[1 of 1] Compiling Main             ( /tmp/pandoc-1.14.0.4-7040/pandoc-1.14.0.4/Setup.hs, /tmp/pandoc-1.14.0.4-7040/pandoc-1.14.0.4/dist/setup/Main.o )
Linking /tmp/pandoc-1.14.0.4-7040/pandoc-1.14.0.4/dist/setup/setup ...
Configuring pandoc-1.14.0.4...
Building pandoc-1.14.0.4...
Preprocessing library pandoc-1.14.0.4...

src/Text/Pandoc.hs:183:8:
Could not find module `Text.Parsec.Error'
There are files missing in the `parsec-3.1.9' package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
pandoc-1.14.0.4 failed during the building phase. The exception was:
ExitFailure 1

如何重新安装pandoc? 我还想知道从root命令行(#)安装pandoc(使用cabal)并使用sudo命令安装它有什么区别? (sudo cabal安装pandoc)

1 个答案:

答案 0 :(得分:0)

解决!

由于我删除(删除了)/root/.cabal/目录(错误地),我的系统仍然可以检测到其他一些包在那里,结果抱怨系统已经拥有所需的包和文件。这是因为/root/.ghc/文件夹仍然存在。删除此文件夹,两个相应的本地文件夹~/.cabal~/.ghc并使用cabal install pandoc解决了我的问题。