Find the answer to your Linux question:
Results 1 to 3 of 3
Running a program get this error. # ch ch: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory However, libtermcap.so.2 is present. # ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2004
    Posts
    8

    libtermcap.so.2: cannot open shared object file


    Running a program get this error.

    # ch
    ch: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory

    However, libtermcap.so.2 is present.
    # ls -l /lib/libtermcap*
    lrwxrwxrwx 1 root root 19 Aug 12 10:03 /lib/libtermcap.so -> libtermcap.so.2.0.8
    lrwxrwxrwx 1 root root 19 Aug 4 13:48 /lib/libtermcap.so.2 -> libtermcap.so.2.0.8
    -rwxr-xr-x 1 root root 15320 Aug 12 10:03 /lib/libtermcap.so.2.0.8

    I tried linking libtermcap.so.2 with libncurses.so.5, but still
    doesn't work.

    ldd /bin/ch
    libtermcap.so.2 => not found
    libm.so.6 => /lib32/libm.so.6 (0x5557c000)
    libc.so.6 => /lib32/libc.so.6 (0x5559d000)
    libdl.so.2 => /lib32/libdl.so.2 (0x556b4000)
    libcrypt.so.1 => /lib32/libcrypt.so.1 (0x556b8000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x55555000)

    libtermcap.so.2 is in the same /lib directory as /ld-linux.so.2.
    Why ld-linux.so.2 is found but not libtermcap.so.2?


    Linux version 2.6.7-gentoo-r11 (root@rose) (gcc version 3.4.1 (Gentoo
    Linux 3.4.1, ssp-3.4-2, pie-8.7.6.3)) amd64

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    run ldconfig to update the linker with the list of libaries that are available to it.

  3. #3
    Just Joined!
    Join Date
    Aug 2004
    Posts
    8
    I do
    # ldconfig /lib/libtermcap.so.2

    but the problem is still there.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •