2014-07-19 7 views
8

Ho Ubuntu 14.04LTS. Ho scaricato l'ultima ghc-7.8.3 da http://www.haskell.org/ghc/download_ghc_7_8_3#x86_64linux e installato a /usr/local.rapporti Cabal "/ usr/bin/LD: non riesce a trovare -lHSrandom-1.0.1.1-ghc7.8.3"

Poi ho aggiornato il mio cabal alla versione 1.20.0.3.

ho digitato cabal install QuickCheck nel mio terminale, ed ha ottenuto:

Resolving dependencies... 
Configuring tf-random-0.5... 
Building tf-random-0.5... 
Preprocessing library tf-random-0.5... 
[1 of 4] Compiling System.Random.TF.Gen (src/System/Random/TF/Gen.hs, dist/build/System/Random/TF/Gen.o) 
[2 of 4] Compiling System.Random.TF.Init (src/System/Random/TF/Init.hs, dist/build/System/Random/TF/Init.o) 

src/System/Random/TF/Init.hs:94:5: Warning: 
    In the use of ‘bitSize’ (imported from Data.Bits): 
    Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead" 
[3 of 4] Compiling System.Random.TF.Instances (src/System/Random/TF/Instances.hs, dist/build/System/Random/TF/Instances.o) 
[4 of 4] Compiling System.Random.TF (src/System/Random/TF.hs, dist/build/System/Random/TF.o) 
/usr/bin/ld: cannot find -lHSrandom-1.0.1.1-ghc7.8.3 
collect2: error: ld returned 1 exit status 
Failed to install tf-random-0.5 
cabal: Error: some packages failed to install: 
QuickCheck-2.7.5 depends on tf-random-0.5 which failed to install. 
tf-random-0.5 failed during the building phase. The exception was: 
ExitFailure 1 

BTW, ho già haskell-platform con ghc-7.6.3 installato tramite apt-get prima.

risposta

12

ricordo di aver un problema simile quando si imposta GHC-7.8. Ha qualcosa a che fare con la nuova cabala, che in qualche modo non è compatibile con le librerie installate con una versio vecchio (ma non riesce a dare ragione problema corretto.

Comunque, credo che reinstallare i pacchetti in questione

cabal install random --reinstall --force-reinstalls 

set su così cabal install tf-random dovrebbe quindi avere successo.

+0

Confermo che funziona bene con GHC 7.8.3. –

+0

come al solito con cabala, la soluzione kludgest è il ricorso migliore. –

+3

Questo può correggere gli errori simili per altri anche le librerie. Se vedi '/ usr/bin/ld: impossibile trovare -lHSfoobar -1.0.1.1-ghc7.8.3' quindi è necessario 'installare cabal foobar -reinstall --force-reinstalls'. Potrebbe essere necessario specificare una versione specifica. – Buttons840