LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't get ghci to run (https://www.linuxquestions.org/questions/linux-newbie-8/cant-get-ghci-to-run-759999/)

srose 10-06-2009 04:01 AM

Can't get ghci to run
 
Hi
I am trying to run the Haskell ghci interpreter through Terminal but I get this error:


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

I have installed ncurses but still get this problem

Can anyone help? I need this for a university assignment.

Thanks

mbostwick 10-06-2009 04:14 AM

What distro are you using ?

mbostwick 10-06-2009 04:24 AM

Mandrake (and redhat and probably others) compile ncurses without the
"--with-termlib" option. The "--with-termlib" option splits ncurses into
two: libncurses and libtinfo. It's not "wrong" to do it one way or the
other, but applications compiled against it need to match.

In other words, grab a source rpm from somewhere and try rebuilding on
your machine it
from http://shoe.bocks.com/nlug/2003-Jul/3221.html
but the key thing here is how did you install ncurses( depends on your distro) and how did you install Haskell ghci

lutusp 10-06-2009 04:33 AM

Quote:

Originally Posted by srose (Post 3709282)
Hi
I am trying to run the Haskell ghci interpreter through Terminal but I get this error:


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

I have installed ncurses but still get this problem

Can anyone help? I need this for a university assignment.

Thanks

If you had used your package manager to install Haskell, this wouldn't have happened.

srose 10-06-2009 07:30 AM

I am using Scientific Linux.

I did try compiling ncurses with --with-termlib

I typed ./configure --with-termlib
then make
then make install

but this did not work.

What exactly am I meant to do?

lutusp 10-06-2009 11:21 AM

Quote:

Originally Posted by srose (Post 3709476)
I am using Scientific Linux.

I did try compiling ncurses with --with-termlib

I typed ./configure --with-termlib
then make
then make install

but this did not work.

What exactly am I meant to do?

Install Haskell using your package manager, not by trying to compile from source. A package manager would sort this all out for you automatically.

srose 10-06-2009 12:57 PM

Hi
Sorry for the simple questions but how do I know what my package manager is? Does it install rpmīs?

lutusp 10-06-2009 01:16 PM

Quote:

Originally Posted by srose (Post 3709867)
Hi
Sorry for the simple questions but how do I know what my package manager is? Does it install rpmīs?

I don't happen to know what Scientific Linux uses but I suspect it it "yum". So do this:

Code:

# yum install haskell-platform
And if anything is missing after that, do this:

Code:

# yum list | grep -i haskell
And choose additional packages.

srose 10-06-2009 01:34 PM

Hi
I ran those commands but it said that not package was found. It doesnīt matter though because I downloaded a ghc source that did not require that libtinfo.so.5 file so now it works.

Thanks very much for you help


All times are GMT -5. The time now is 11:01 AM.