You are not logged in.

#1 2015-04-08 00:12:13

Lezkus
Member
Registered: 2015-02-23
Posts: 15

[Solved]Problems installing ghc

After installing ghc, if I try to execute any Haskell file I get the following error:

/usr/local/lib/ghc-7.8.3/bin/ghc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

I have read that some people have run into the same error but only using other programs, not ghc.

Some of them have solve this problem via some symbolic links in /lib and /lib64 but none of those solutions have worked for me so far.

The output of ldd /usr/local/lib/ghc-7.8.3/bin/ghc shows these missing files too:

	linux-vdso.so.1 (0x00007ffdf378e000)
	libtinfo.so.5 => not found
	librt.so.1 => /usr/lib/librt.so.1 (0x00007f90d51b8000)
	libutil.so.1 => /usr/lib/libutil.so.1 (0x00007f90d4fb5000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f90d4db1000)
	libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f90d4b1f000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f90d481a000)
	libHShaskeline-0.7.1.2-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../haskeline-0.7.1.2/libHShaskeline-0.7.1.2-ghc7.8.3.so (0x00007f90d449a000)
	libHSterminfo-0.4.0.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../terminfo-0.4.0.0/libHSterminfo-0.4.0.0-ghc7.8.3.so (0x00007f90d4262000)
	libHSghc-7.8.3-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../ghc-7.8.3/libHSghc-7.8.3-ghc7.8.3.so (0x00007f90d0846000)
	libHStransformers-0.3.0.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../transformers-0.3.0.0/libHStransformers-0.3.0.0-ghc7.8.3.so (0x00007f90d0599000)
	libHStemplate-haskell-2.9.0.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../template-haskell-2.9.0.0/libHStemplate-haskell-2.9.0.0-ghc7.8.3.so (0x00007f90d0153000)
	libHShpc-0.6.0.1-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../hpc-0.6.0.1/libHShpc-0.6.0.1-ghc7.8.3.so (0x00007f90cff26000)
	libHShoopl-3.10.0.1-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../hoopl-3.10.0.1/libHShoopl-3.10.0.1-ghc7.8.3.so (0x00007f90cfc9a000)
	libHSbin-package-db-0.0.0.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../bin-package-db-0.0.0.0/libHSbin-package-db-0.0.0.0-ghc7.8.3.so (0x00007f90cfa82000)
	libHSbinary-0.7.1.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../binary-0.7.1.0/libHSbinary-0.7.1.0-ghc7.8.3.so (0x00007f90cf807000)
	libHSCabal-1.18.1.3-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../Cabal-1.18.1.3/libHSCabal-1.18.1.3-ghc7.8.3.so (0x00007f90cec98000)
	libHSprocess-1.2.0.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../process-1.2.0.0/libHSprocess-1.2.0.0-ghc7.8.3.so (0x00007f90cea79000)
	libHSpretty-1.1.1.1-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../pretty-1.1.1.1/libHSpretty-1.1.1.1-ghc7.8.3.so (0x00007f90ce85e000)
	libHScontainers-0.5.5.1-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../containers-0.5.5.1/libHScontainers-0.5.5.1-ghc7.8.3.so (0x00007f90ce47a000)
	libHSdirectory-1.2.1.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../directory-1.2.1.0/libHSdirectory-1.2.1.0-ghc7.8.3.so (0x00007f90ce25d000)
	libHSunix-2.7.0.1-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../unix-2.7.0.1/libHSunix-2.7.0.1-ghc7.8.3.so (0x00007f90cdf98000)
	libHStime-1.4.2-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../time-1.4.2/libHStime-1.4.2-ghc7.8.3.so (0x00007f90cdc9f000)
	libHSold-locale-1.0.0.6-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../old-locale-1.0.0.6/libHSold-locale-1.0.0.6-ghc7.8.3.so (0x00007f90cda8d000)
	libHSfilepath-1.3.0.2-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../filepath-1.3.0.2/libHSfilepath-1.3.0.2-ghc7.8.3.so (0x00007f90cd86e000)
	libHSbytestring-0.10.4.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../bytestring-0.10.4.0/libHSbytestring-0.10.4.0-ghc7.8.3.so (0x00007f90cd58a000)
	libHSdeepseq-1.3.0.2-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../deepseq-1.3.0.2/libHSdeepseq-1.3.0.2-ghc7.8.3.so (0x00007f90cd382000)
	libHSarray-0.5.0.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../array-0.5.0.0/libHSarray-0.5.0.0-ghc7.8.3.so (0x00007f90cd0e7000)
	libHSbase-4.7.0.1-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../base-4.7.0.1/libHSbase-4.7.0.1-ghc7.8.3.so (0x00007f90cc73b000)
	libHSinteger-gmp-0.5.1.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../integer-gmp-0.5.1.0/libHSinteger-gmp-0.5.1.0-ghc7.8.3.so (0x00007f90cc51f000)
	libHSghc-prim-0.3.1.0-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../ghc-prim-0.3.1.0/libHSghc-prim-0.3.1.0-ghc7.8.3.so (0x00007f90cc29f000)
	libHSrts_thr-ghc7.8.3.so => /usr/local/lib/ghc-7.8.3/bin/../rts-1.0/libHSrts_thr-ghc7.8.3.so (0x00007f90cc02f000)
	libffi.so.6 => /usr/local/lib/ghc-7.8.3/bin/../rts-1.0/libffi.so.6 (0x00007f90cbe22000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f90cbc05000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f90cb862000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f90d53c0000)
	libtinfo.so.5 => not found
	libtinfo.so.5 => not found
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f90cb64c000)

Thank you in advance!

Last edited by Lezkus (2015-04-09 18:11:04)

Offline

#2 2015-04-08 00:12:48

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [Solved]Problems installing ghc

How did you install ghc?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2015-04-08 00:17:39

Lezkus
Member
Registered: 2015-02-23
Posts: 15

Re: [Solved]Problems installing ghc

As suggested on the wiki: https://wiki.archlinux.org/index.php/Haskell

pacman -S ghc

Offline

#4 2015-04-08 00:23:05

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [Solved]Problems installing ghc

Lies, the ghc package does not put files in /usr/local/


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2015-04-08 08:29:48

Lezkus
Member
Registered: 2015-02-23
Posts: 15

Re: [Solved]Problems installing ghc

Uhmmmm

I have installed it with pacman -S ghc but after that I also installed cabal-install and I did a cabal update and I installed ghc-mod from cabal.

Could that have been the problem?

Last edited by Lezkus (2015-04-08 08:34:04)

Offline

#6 2015-04-08 08:50:38

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved]Problems installing ghc

If you did that as root and for some reason cabal installed another ghc for ghc-mod, that would explain the files in /usr/local.

Offline

#7 2015-04-08 09:03:53

Lezkus
Member
Registered: 2015-02-23
Posts: 15

Re: [Solved]Problems installing ghc

And how can I uninstall it or fix the problem?

The only thing I found related to this on the wiki weren't of much help:

Removing packages
There is no easy way to do it.

Offline

#8 2015-04-08 21:21:21

Lezkus
Member
Registered: 2015-02-23
Posts: 15

Re: [Solved]Problems installing ghc

I managed to solved that problem as stated here: http://www.linuxquestions.org/questions … 175466995/
this is:

cd /lib64
ln -s libncurses.so.5 libtinfo.so.5

But now it doesn't load the prelude:

$ghc Main.hs
Main.hs:1:1:
    Could not find module ‘Prelude’
    Use -v to see a list of the files searched for.

Last edited by Lezkus (2015-04-08 21:21:43)

Offline

#9 2015-04-09 00:12:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]Problems installing ghc

Symlinking like this may come back to bite you. At least make a note about it.

Offline

#10 2015-04-09 18:10:26

Lezkus
Member
Registered: 2015-02-23
Posts: 15

Re: [Solved]Problems installing ghc

Problem solved.

The problem was that I wasn't doing a clean install, since I had used (I didn't remember it, sorry) a third party script to install haskell without having read it before. After that, since the script threw an error I supposed that it hadn't installed anything, but clearly I was wrong.

After removing everything that was not supposed to be there and doing a clean install everything runs smoothly

Last edited by Lezkus (2015-04-09 18:10:45)

Offline

Board footer

Powered by FluxBB