xmonad找不到模块`XMonad':破解包

时间:2010-10-27 19:50:44

标签: haskell ghc xmonad

你好我的Xmonad几天前一直工作得很好,然后我想我用Synaptic安装了一些东西然后开始抱怨Xmonad.Config.Gnome 这是我的xmonad.hs

import XMonad
import XMonad.Config.Gnome


myManageHook = composeAll [
            (className =? "Pidgin" <&&> title =? "Buddy List") --> doFloat
           , (className =? "Gnome-panel" <&&> title =? "Run Application") --> doFloat
           -- , (className =? "XEyes") --> doShift "7"
           ]


main = xmonad $ gnomeConfig {
         modMask = mod4Mask
       , manageHook = myManageHook <+> manageHook gnomeConfig
       }

当我编译时,我得到了这个:

ghc --make "xmonad.hs" (nella cartella: /home/giuseppe/.xmonad)
xmonad.hs:2:7:
Could not find module `XMonad.Config.Gnome':
  Use -v to see a list of the files searched for.

Compilazione fallita。

使用ghc-pkg list我得到:

WARNING: there are broken packages.  Run 'ghc-pkg check' for more details.
/var/lib/ghc-6.12.1/package.conf.d
Cabal-1.8.0.2
X11-1.5.0.0
X11-xft-0.3
array-0.3.0.0
base-3.0.3.2
base-4.2.0.0
bin-package-db-0.0.0.0
bytestring-0.9.1.5
containers-0.3.0.0
directory-1.0.1.0
dph-base-0.4.0
dph-par-0.4.0
dph-prim-interface-0.4.0
dph-prim-par-0.4.0
dph-prim-seq-0.4.0
dph-seq-0.4.0
extensible-exceptions-0.1.1.1
filepath-1.1.0.3
ghc-6.12.1
ghc-binary-0.5.0.2
ghc-prim-0.2.0.0
haskell98-1.0.1.1
hpc-0.5.0.4
integer-gmp-0.2.0.0
mtl-1.1.0.2
old-locale-1.0.0.2
old-time-1.0.0.3
pretty-1.0.1.1
process-1.0.1.2
random-1.0.0.2
rts-1.0
syb-0.1.0.2
template-haskell-2.4.0.0
time-1.1.4
unix-2.4.0.0
utf8-string-0.3.4
xmonad-0.9.1
/home/giuseppe/.ghc/i386-linux-6.12.1/package.conf.d
HTTP-4000.0.9
MonadCatchIO-mtl-0.3.0.1
binary-0.5.0.2
binary-shared-0.8.1
deepseq-1.1.0.0
ghc-mtl-1.0.1.0
ghc-paths-0.1.0.8
hslogger-1.0.12
libmpd-0.5.0
network-2.2.1.8
parsec-2.1.0.1
process-leksah-1.0.1.3
regex-base-0.93.2
regex-tdfa-1.1.4
split-0.1.2.1
xhtml-3000.2.0.1
xmonad-0.9.1
xmonad-contrib-0.9.1
zlib-0.5.2.0

和ghc-pkg:

There are problems in package xmonad-contrib-0.9.1:
dependency "unix-2.4.0.0-7d42d72856fae71324453279e546294e" doesn't exist
There are problems in package xmonad-0.9.1:
dependency "unix-2.4.0.0-7d42d72856fae71324453279e546294e" doesn't exist

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
xmonad-contrib-0.9.1
xmonad-0.9.1

所以看起来两个包都坏了。解决这个问题的最佳方法是什么?提前致谢

1 个答案:

答案 0 :(得分:7)

ghc-pkg显示的错误表明,自安装xmonad以来,unix-2.4.0.0软件包已被更改。

只需重新安装xmonad和xmonad-contrib即可修复此问题。如果您使用cabal-install(即通过运行cabal install xmonad)安装它们,那么只需重新运行该命令即可。如果您使用Synaptic或类似工具安装它们,那么我怀疑使用Synaptic重新安装会破坏您最近安装的任何破坏xmonad的内容。您可能希望查看打开的错误,看看这是否是一个已知问题,因为它听起来像一个破损的包。如果是这种情况,快速运行的最佳选择可能是卸载xmonad和xmonad-contrib,然后使用cabal-install重新安装它们。