# # (SCO Unix) I get an error message 'Can't access shared library'
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

SCO Unix, Xenix and ODT General FAQ

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© December 2003 (various)

This article is from a FAQ concerning SCO operating systems. While some of the information may be applicable to any OS, or any Unix or Linux OS, it may be specific to SCO Xenix, Open This is an old article about a shared library error on SCO Unix and is only left here for historical purposes. There is lots of Linux, Mac OS X and general Unix info elsewhere on this site: Search this site is the best way to find anything.

I get an error message "Can't access shared library" on SCO Unix

You are missing a shared library. For example, you might need libsocket.so.2 or whatever . You just need to find the patch or code that provides that. You do not need to be concerned about code that needs (for example) libsocket.so.1 - you aren't replacing that, you are adding a new version. Old code still uses the old, new code that needs the new now has it.

Bela Lubkin posted the following to comp.unix.sco.misc in response to someone getting this message on a 3.2v4.2 system:

Well, that's a _good_ sign -- it proves you have a COFF binary, which at least has a _chance_ of working under 3.2v4.2. If it was an ELF binary you would get something like "cannot execute".

You can query the shared libraries needed by a COFF binary. Run:

 
   dump -Lv Mosaic
 

dump(CP) is part of the development system. If you don't have it, you can do a crude simulation by running:

 
   strings Mosaic | grep /shlib
 

Compare the output to the actual contents of your /shlib directory. You'll find one or more libraries either missing, or with wrong permissions. If it's just a permissions problem, fix it; if a library is missing, ask about it here, people will know where to find it.

On OpenServer 5, which runs both COFF and ELF binaries, both `dump` and `ldd` are useful:

 
 ### shows _both_ COFF and ELF shared objects; only choice for COFF:
 # dump -Lv binary       # optional:    | grep /    -- eliminate noise
 
 ### only works on ELF; knows about UDK runtime; best choice for ELF;
 ### but aborts after one missing library, so `dump -Lv` also useful:
 # ldd binary
 
 ### example 1: OpenServer ELF binary with both ELF and COFF shared objects
 # file /usr/bin/rcp
 /usr/bin/rcp:   ELF 32-bit LSB executable 80386, dynamically linked, stripped, no debug
 # dump -Lv /usr/bin/rcp | grep /
 /usr/bin/rcp:
 [1]     NEEDED   /usr/lib/libndbm.so
 [2]     NEEDED   /usr/lib/libsocket.so.1
 [3]     NEEDED   /usr/lib/libc.so.1
 /usr/bin/rcp:
         /shlib/libkrb5stand_s
 # ldd /usr/bin/rcp
 dynamic linker: /usr/bin/rcp: file loaded: /usr/lib/libndbm.so
 dynamic linker: /usr/bin/rcp: file loaded: /usr/lib/libsocket.so.1
 dynamic linker: /usr/bin/rcp: file loaded: /usr/lib/libc.so.1
 # mv /usr/lib/libndbm.so /usr/lib/libndbm.missing; ldd /usr/bin/rcp
 dynamic linker : /usr/bin/rcp : error opening /usr/lib/libndbm.so
 # mv /usr/lib/libndbm.missing /usr/lib/libndbm.so
 
 ### example 2: UnixWare ELF binary
 # file /udk/bin/uname
 /udk/bin/uname:  ELF 32-bit LSB executable 80386, dynamically linked, stripped, no
 debug (unixware)
 # dump -Lv /udk/bin/uname | grep /
 /udk/bin/uname:
 [1]     NEEDED   /usr/lib/libc.so.1
 # ldd /udk/bin/uname
 /udk/bin/uname needs:
         /usr/lib/libc.so.1 => /udk/usr/lib/libc.so.1
 
 ### example 3: COFF binary
 # file /u/belal/bin/Csum
 /u/belal/bin/Csum:      iAPX 386 COFF demand-paged executable
 # ldd /u/belal/bin/Csum
 ldd: /u/belal/bin/Csum is not an ELF file
 # dump -Lv /u/belal/bin/Csum | grep /
 /u/belal/bin/Csum:
 /u/belal/bin/Csum:
         /shlib/libc_s
 

This thread has some details of ELF binaries and SCO Compilers.

If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> (SCO Unix) I get an error message 'Can't access shared library'


Inexpensive and informative Apple related e-books:

Take Control of iCloud, Fifth Edition

Take Control of Pages

Take Control of IOS 11

iOS 10: A Take Control Crash Course

Take Control of Automating Your Mac






Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





I was taught that the human brain was the crowning glory of evolution so far, but I think it’s a very poor scheme for survival (Kurt Vonnegut).




Linux posts

Troubleshooting posts


This post tagged:

FAQ



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode