Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
expect not working on Linux

Posted by Nuts (Nuts), 25 September 2007
I need a bit of help regarding the installation of expect on linux.
I am not able to run any script using expect. Though it was working fine sometime back but since I recently have a fresh installation of Linux. After the installation, I tried every possible(installation of expect, tcl etc) thing but nothing has really worked out for me. Its giving the following error as below.

Trace
--------
[neetesh@neetesh-OME ~]$ expect
expect: error while loading shared libraries: libexpect5.43.so: cannot open shared object file: No such file or directory

Could you help me guys on this ??

thanx,
Nuts

Posted by admin (Graham Ellis), 25 September 2007
Either expect isn't installed, or it is installed and the library is in the wrong place, or you've got a problem with the version numbers.  As a first stage, I would look around for the library and also have a look at things like the LDPATH.

Posted by Nuts (Nuts), 25 September 2007
I am using the following versions for tcl and expect
- expect-5.43
- tcl8.4.15

Here tcl is working fine but expect isn't.

I copied both the tcl and expect package in the following dir
/usr/local/src
Then I run the configure command as follows :
./configure =/usr --with-tcl=/usr/lib --with-tclinclude=/usr/local/src/tcl8.4.15 --enable-shared --enable-static --enable-threads --enable-gcc | tee config_trc1

Trace for config_trc1
=====================
configuring Expect 5.43.0
checking for autoconf... yes
checking configure up to date... yes
checking host system type...
checking target system type...
checking build system type...
checking shell to use within Make...
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for building with threads... no (default)
checking for Tcl configuration... found /usr/lib/tclConfig.sh
checking Tcl build library... -L/usr/lib -ltcl8.4 -ldl  -lieee -lm
checking for Tcl_CreateCommand... yes
checking if Tcl library build specification is valid... yes
checking for Tk configuration... checking for Tk_Init... no
checking if Tk library build specification is valid... no
checking whether the compiler (i386-redhat-linux-gcc -pipe) actually works... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking how to run the C preprocessor... i386-redhat-linux-gcc -pipe -E
checking if running LynxOS... no
checking for ANSI C header files... yes
checking for pid_t... yes
checking return type of signal handlers... void
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking if running Mach... no
checking if running MachTen... no
checking if on Pyramid... no
checking if on Apollo... no
checking if on Interactive... no
checking stty to use... /bin/stty
checking if stty reads stdout... no
checking if running Solaris... no
checking for sin... no
checking for Tcl private headers... found in /usr/local/src/tcl8.4.15/generic
checking type of library to build... both shared and unshared
loading cache .././config.cache
checking for gcc... (cached) gcc
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for Tcl configuration... (cached) found /usr/lib/tclConfig.sh
checking Tcl build library... -L/usr/lib -ltcl8.4 -ldl  -lieee -lm
checking for Tcl_CreateCommand... (cached) yeschecking if Tcl library build specification is valid... yes
checking whether the compiler (i386-redhat-linux-gcc -pipe) actually works... yes
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking for ranlib... (cached) ranlib
checking how to run the C preprocessor... (cached) i386-redhat-linux-gcc -pipe -E
checking if running LynxOS... (cached) no
checking for Tcl private headers... (cached) found in /usr/include/tcl8.4.15/generic
checking if we are running Linux... yes
checking for strchr... (cached) yes
checking for stdlib.h... (cached) yes
checking type of library to build... both shared and unshared
updating cache .././config.cache
creating ./config.status
creating Makefile
creating pkgIndex
creating tcldbgcf.h
Begin tests for function/library dependencies.  Tests may be repeated
up to three times.  First test is for building Expect's shared library.
Second set is for building with Tcl.  Third is for building with Tk.
checking for gethostname... yes
checking for gethostname... yes
checking for gethostname... yes
checking for socket... yes
checking for socket... yes
checking for socket... yes
checking for select... yes
checking for select... yes
checking for select... yes
checking for getpseudotty... no
checking for getpseudotty in -lseq... no
checking for getpseudotty... no
checking for getpseudotty in -lseq... no
checking for getpseudotty... no
checking for getpseudotty in -lseq... no
checking for openpty... no
checking for openpty in -lutil... yes
checking for openpty... no
checking for openpty in -lutil... yes
checking for openpty... no
checking for openpty in -lutil... yes
checking if running Sequent running SVR4... no
checking for sys/sysmacros.h... yes
checking for stdlib.h... yes
checking for inttypes.h... yes
checking for varargs.h... no
checking for unistd.h... yes
checking for sys/stropts.h... yeschecking for sys/sysconfig.h... no
checking for sys/fcntl.h... yes
checking for sys/select.h... yes
checking for sys/time.h... yes
checking for sys/ptem.h... no
checking for sys/strredir.h... no
checking for sys/strpty.h... no
checking for sys/bsdtypes.h... no
checking for memmove... yes
checking for sysconf... yes
checking for strftime... yes
checking for strchr... yes
checking for timezone... yes
checking for siglongjmp... yes
checking for memcpy... yes
checking if WNOHANG requires _POSIX_SOURCE... no
checking if any value exists for WNOHANG... yes
checking union wait... yes
checking mask type of select... none
checking if signals need to be re-armed... no
checking if on Convex... no
checking if on NeXT... no
checking if on HP... no
checking sane default stty arguments...
checking for HP style pty allocation... no
checking for HP style pty trapping... no
checking for AIX new-style pty allocation... no
checking for SGI old-style pty allocation... no
checking for SCO style pty allocation... no
checking for SVR4 style pty allocation... yes
checking for libpts=-lpt in -lpt... no
checking for ptsname... yes
checking for ptsname... (cached) yes
checking for ptsname... (cached) yes
checking for OSF/1 style pty allocation... no
checking for tcgetattr... yes
checking for tcsetattr... yes
checking for struct sgttyb... no
checking for struct termio... yes
checking for struct termios... yes
checking if TCGETS or TCGETA in termios.h... no
checking if TIOCGWINSZ in termios.h... no
checking for Cray-style ptys... no
checking for select... yes
checking for poll... yes
checking event handling... via selectchecking for _getpty... no
checking for getpty... no
checking whether setpgrp takes no argument... yes
checking for SV-style timezone... yes
checking for Tk private headers... checking for tk.h... no
       WARNING: Can't find Tk headers or library.  You can still
       build expect, but not expectk.  See Expect's README for
       information on how to obtain Tk.  If Tk is installed, see
       Expect's INSTALL on how to tell configure where Tk is
       installed.
checking for long file names... yes
checking for type of library to build... both shared and unshared
creating ./config.status
creating Makefile
creating pkgIndex
creating expect_cf.h
expect_cf.h is unchanged
configuring in testsuite
running /bin/sh ./configure  =/usr --with-tcl=/usr/lib --with-tclinclude=/usr/local/src/tcl8.4.15 --enable-shared --enable-static --enable-threads --enable-gcc --cache-file=.././config.cache --srcdir=.
loading cache .././config.cache
checking for Tcl configuration... (cached) found /usr/lib/tclConfig.sh
checking Tcl build library... -L/usr/lib -ltcl8.4 -ldl  -lieee -lm
checking for Tcl_CreateCommand... (cached) yes
checking if Tcl library build specification is valid... yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking whether the compiler (gcc) actually works... yes
checking how to run the C preprocessor... (cached) i386-redhat-linux-gcc -pipe -E
checking if running LynxOS... (cached) no
checking for Tcl private headers... (cached) found in /usr/include/tcl8.4.15/generic
updating cache .././config.cache
creating ./config.status
creating Makefile

I think expect  has been installed but its looking for .so file because of which its failing.
                                                                                       176,1         Bot

                                                                                       140,1         72%

                                                                                       94,1          36%

                                                                                       1,1           Top



Posted by admin (Graham Ellis), 27 September 2007
That's a long post - I appreciate the difficulty in keeping it down sometimes, but igf it can be kept on one page it makes it much easier and efficient to help.

Quote:
--with-tcl=/usr/lib --with-tclinclude=/usr/local/src/tcl8.4.15


I don't know the history of your build / what is where, nut I do question whether you're using one version of Tcl that's supplied with you OS for part of the build, and the include files for a later version that you've installed yourself, and they're not mixing very well.

Posted by Nuts (Nuts), 28 September 2007
Hi Graham,
                  The expect issue is resolved. The issue was
with the env variable $PATH in the .bash_profile.

Thanks for your help.


thanx,
Nuts



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

1 unpublished comment pending on this page

edit your own (not yet published) comments

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho