2014-10-09 15 views
7

Meine Ghc-Installation war veraltet, also habe ich beschlossen, ghc und cabal neu zu installieren, um hoffentlich einige Probleme zu beheben. Ich fing an, die Schritte here zu folgen. GHC ist jetzt Version 7.8.3.Installing Cabal hat fehlende Module

Ich entfernte dann ~/.cabal und versuchte, mit den Schritten zu installieren, aber es schlägt fehl. So entfernte ich .cabal wieder und versucht, die Schritte here aber wenn ich sh bootstrap.sh laufen läuft es in fehlende Module:

Using local tarball for parsec-3.1.6. 
[1 of 1] Compiling Main    (Setup.hs, Setup.o) 
Linking Setup ... 
Configuring parsec-3.1.6... 
Building parsec-3.1.6... 
Preprocessing library parsec-3.1.6... 

Text/Parsec/Prim.hs:80:8: 
Could not find module ‘Control.Monad.Trans’ 
There are files missing in the ‘mtl-2.2.1’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Text/Parsec/Prim.hs:81:8: 
Could not find module ‘Control.Monad.Identity’ 
There are files missing in the ‘mtl-2.2.1’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Text/Parsec/Prim.hs:83:8: 
Could not find module ‘Control.Monad.Reader.Class’ 
There are files missing in the ‘mtl-2.2.1’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Text/Parsec/Prim.hs:84:8: 
Could not find module ‘Control.Monad.State.Class’ 
There are files missing in the ‘mtl-2.2.1’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Text/Parsec/Prim.hs:85:8: 
Could not find module ‘Control.Monad.Cont.Class’ 
There are files missing in the ‘mtl-2.2.1’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Text/Parsec/Prim.hs:86:8: 
Could not find module ‘Control.Monad.Error.Class’ 
There are files missing in the ‘mtl-2.2.1’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Text/Parsec/Text.hs:19:18: 
Could not find module ‘Data.Text’ 
There are files missing in the ‘text-1.2.0.0’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Text/Parsec/Text/Lazy.hs:19:18: 
Could not find module ‘Data.Text.Lazy’ 
There are files missing in the ‘text-1.2.0.0’ package, 
try running 'ghc-pkg check'. 
Use -v to see a list of the files searched for. 

Error during cabal-install bootstrap: 
Building the parsec package failed. 

Als ich ghc-pkg check laufen bekomme ich eine ganze Menge Sachen wie diese:

cannot find any of ["libHSOpenGLRaw-1.5.0.0.a","libHSOpenGLRaw-1.5.0.0.p_a","libHSOpenGLRaw-1.5.0.0-ghc7.8.3.so","libHSOpenGLRaw-1.5.0.0-ghc7.8.3.dylib","HSOpenGLRaw-1.5.0.0-ghc7.8.3.dll"] on library path 
Warning: haddock-interfaces: /usr/local/share/doc/x86_64-linux-ghc-7.8.3/Cabal-1.21.1.0/html/Cabal.haddock doesn't exist or isn't a file 
Warning: haddock-html: /usr/local/share/doc/x86_64-linux-ghc-7.8.3/Cabal-1.21.1.0/html doesn't exist or isn't a directory 

und dann der:

The following packages are broken, either because they have a problem 
listed above, or because they depend on a broken package. 
text-1.1.0.1 
Cabal-1.20.0.2 
zlib-0.5.4.1 
contravariant-1.2 
void-0.6.1 
netwire-5.0.0 
semigroups-0.15.3 
unordered-containers-0.2.5.0 
transformers-compat-0.3.3.4 
exceptions-0.6.1 
MonadRandom-0.3 
mtl-2.2.1 
transformers-0.4.1.0 
cpphs-1.18.5 
polyparse-1.9 
nats-0.2 
hashable-1.2.2.0 
OpenGL-2.9.2.0 
text-1.2.0.0 
tagged-0.7.2 
stb-image-0.2.1 
split-0.2.2 
reflection-1.5.1 
random-1.0.1.1 
primitive-0.5.3.0 
prelude-extras-0.4 
parallel-3.2.0.4 
bitmap-0.0.2 
bindings-DSL-1.0.21 
GLURaw-1.4.0.1 
OpenGLRaw-1.5.0.0 
+0

Was passiert, wenn Sie 'ghc-pkg check' wie vorgeschlagen ausführen? –

+0

@GaneshSittampalam aktualisierte Frage mit ghc-pkg überprüfen Ausgang –

+0

GHC-Pakete zuerst reinigen. Das Arbeiten in Sandboxes ist sowieso die zuverlässigste Art, globale Pakete brechen oft sehr stark. –

Antwort

7

Sie können entweder ghc-pkg unregister auf jedem der kaputten Pakete verwenden sie richtig zu reinigen, o rauben Sie möglicherweise den gesamten Ordner ~/.ghc weg und beginnen Sie erneut. Möglicherweise müssen Sie --force verwenden, um die Abhängigkeitsreihenfolge der Pakete nicht zu berücksichtigen.

+0

Ich denke, er sollte auch seinen .cabal-Ordner entfernen, bevor ich über – Arnon

+0

starte. Ich habe mein .ghc-Verzeichnis nicht entfernt. Nur um klar zu sein, muss ich .ghc und .cabal entfernen und dann ghc und cabal neu installieren oder einfach diese Verzeichnisse entfernen und cabal installieren? –

+1

entfernt .ghc und .cabal und versuchte es erneut, cabal ist installiert und auf dem neuesten Stand. Danke Ganesh. –

3

Haben Sie auch ~/.ghc entfernt, als Sie ~/.cabal entfernt haben? Wenn nicht, schlage ich vor, dass Sie das versuchen, denn wenn ich richtig verstehe, kann der erste Verweis auf Pakete enthalten, die im zweiten installiert wurden.

Verwandte Themen