What is an .so file?

49

10

I'm having problems with Flash under ubuntu and was going to try and upgrade to the Alpha release of Flash 10.1.

The problem is that it came as a .so file, and I can't find any information as to what this is.

John Moffitt

Posted 2009-11-16T21:48:23.900

Reputation: 761

Related post - What's the difference between .so, .la and .a library files?

– RBT – 2018-05-21T23:44:04.313

1

Other poster have already answered your question, so no point for me to add another substantially identical text. I attract your attention on this bug though (https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/434050) as maybe your symptoms are similar and you would like to take a look in there.

– mac – 2009-11-17T00:03:06.950

1Almost forgot: in the bug description linked above, there is also a workaround that solves the problem (comment #16). Best of luck! – mac – 2009-11-17T00:04:49.707

Answers

68

An .so file is a compiled library file. It stands for "Shared Object" and is analogous to a Windows DLL.

Often, package files will place these under /lib or /usr/lib or some place similar when they're installed. If you extract an .so file to a location in your $LD_LIBRARY_PATH, a program that requires the library should be able to use it.

Ideally, read the accompanying documentation to ensure that it's in the right location.

If you run a command like locate adobe-flashplugin from the Terminal you may see some existing similarly-named libraries.

Andrew Flanagan

Posted 2009-11-16T21:48:23.900

Reputation: 1 680

Ok.. Let's imagine I have an .so file... What do I need to "use" it? – Pitto – 2015-04-01T23:19:25.670

@Pitto You will need to find which functions are defined inside and call them from your own C / C++ program. Then you will need to link the shared library to your program. – Mark – 2019-11-14T16:55:53.753

2Unless Ubuntu does things completely differently from other Linux dynamic linkers, the dynamic linker does not search the path ($PATH), but rather searches a fixed set of paths as well as the directories specified in $LD_LIBRARY_PATH.

See the man pages for ld.so and ldconfig for more details. – Chris Cleeland – 2009-11-16T22:34:20.123

That sounds right -- thanks... $LD_LIBRARY_PATH not $PATH. :-) – Andrew Flanagan – 2009-11-16T23:19:23.637

1/usr/lib and /lib are much more common than /var/lib. Actually, it's pretty rare to put a library in /var/lib. – qedi – 2009-11-16T23:54:58.933

Sorry -- was in a rush. :-) I'll correct it... – Andrew Flanagan – 2009-11-17T02:05:08.100

10

There are two Linux C/C++ library types that can be created. Those are Static libraries (.a) and Dynamically linked shard object libraries (.so)

When it comes to (.so), there is only one form of this library but it can be used in two ways.

1) Dynamically linked at run time but statically aware. The libraries must be available during compile/link phase. The shared objects are not included into the executable component but are tied to the execution.

2) Dynamically loaded/unloaded and linked during execution (i.e. browser plug-in) using the dynamic linking loader system functions.

Normally package files will place ".so" files in /lib or /usr/lib when installing.

Erandi

Posted 2009-11-16T21:48:23.900

Reputation: 101

3

It is a dynamically linked shared object library, analogous to a .dll file in Windows.

Here are a couple of posts for installing Flash 10 in Ubuntu x64 and x86:

Make sure you've uninstalled any previous versions of Flash befor installing 10.

squillman

Posted 2009-11-16T21:48:23.900

Reputation: 5 676