473,777 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to track down all required shared libraries?

Recently, I installed many shared libraries to run a program written in
Python.
Now, I am in the situation to run the same program but on several
different machines with the same Linux OS. To avoid the reinstallation,
I like to pack up all shared libraries into a directory. Is there a
good way to track down all shared libraries required to run a Python
program?

Daehyok Shin

Jul 19 '05 #1
3 1833
sdhyok wrote:
Recently, I installed many shared libraries to run a program written in
Python.
Now, I am in the situation to run the same program but on several
different machines with the same Linux OS. To avoid the reinstallation,
I like to pack up all shared libraries into a directory. Is there a
good way to track down all shared libraries required to run a Python
program?

Daehyok Shin


To get executable requirements use ldd.
When python can't load a lib at run-time usually ImportError is raised.
As with other errors you can never know which libs will be dynamically
required.

Mike

Jul 19 '05 #2
One poster suggests 'ldd' for executables. You can also use this on shared
libraries:
$ ldd /usr/lib/python2.3/lib-dynload/_tkinter.so
libtix8.1.8.4.s o => /usr/lib/libtix8.1.8.4.s o (0x009b6000)
libtk8.4.so => /usr/lib/libtk8.4.so (0x00111000)
libtcl8.4.so => /usr/lib/libtcl8.4.so (0x00539000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00a48000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x001de000)
libc.so.6 => /lib/tls/libc.so.6 (0x001f0000)
libdl.so.2 => /lib/libdl.so.2 (0x0052d000)
libm.so.6 => /lib/tls/libm.so.6 (0x00fcf000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00656000)
If you know what shared modules your program uses, you can "ldd" them all and
find out the set of libraries they are linked to.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCdEWiJd0 1MZaTXX0RAvPwAJ 0b51GVGM2ww5RL/Ax4qLYKyTAw9wCd HArx
yf7xuETvoVn+XPE fwB6D8Do=
=5RoY
-----END PGP SIGNATURE-----

Jul 19 '05 #3
Hello sdhyok,
Now, I am in the situation to run the same program but on several
different machines with the same Linux OS. To avoid the reinstallation,
I like to pack up all shared libraries into a directory. Is there a
good way to track down all shared libraries required to run a Python
program?

There is a module call "modulefind er" in Python standard library. It might
do what you want.

HTH.
--
------------------------------------------------------------------------
Miki Tebeka <mi*********@zo ran.com>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)

iD8DBQFCdOcP8jA dENsUuJsRArs7AJ 488mqC6ZbR0WPiQ ScvYWfxfePjZACg w5K5
AAqQhmq75umIo4T 6TpFbTWg=
=4Som
-----END PGP SIGNATURE-----

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2271
by: Phil | last post by:
I realize this is the php group, but I have a question that recurses back to my php install. My objective is a pure 64 bit shared object installation of php 5.0 on UltraSparc Solaris 9 compiled with the Sun Compiler version 8. My problem is that EVERYTHING builds great EXCEPT that the 6b distribution of JPEG will NOT build a shared object, thus gd cannot include support for JPEG, thus php loses that functionality.
0
1121
by: Frieder Loercher | last post by:
Hello, I am developping a (lammpi) parallel Application where any of the processes uses the Python script language. It works fine on Compaq Alpha and SUN Solaris5.9 On AIX5.1, it doesn't work. In fact, there is a problem in using shared libraries on AIX in combination with the parallelisation (lammpi).
3
2608
by: Rickard Lind | last post by:
Is there any way to build the python executable statically and still be able to load modules built as shared libraries? I'm trying to run python scripts on a stripped down FreeBSD (4.9) machine which has no shared system libraries so I want to link it statically against libc et al, but it would be nice to still be able to load modules which were built as shared libraries. In particular I have a library for which I've generated a wrapper...
8
8554
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of each object within my JS app to help locate my problem? Thanks
0
1560
by: Samuele Pedroni | last post by:
Registration for Europython (3-5 July) at CERN in Geneva is now open, if you feel submitting a talk proposal there's still time until the 31th of May. If you want to talk about a library you developed, or you know well and want to share your knowledge, or about how you are making the best out of Python through inventive/elegant idioms and patterns (or if you are a language guru willing to disseminate your wisdom), you can submit a...
5
475
by: David T. Ashley | last post by:
I've occasionally had trouble compiling and linking programs that use shared libraries. That never made a lot of sense to me, because I thought the operating system went hunting for the symbols and libraries at runtime (and not before). Questions: a)How do the development tools know that a given symbol (a function entry point, for example) is located in a shared library and won't be linked in statically?
3
3275
by: Bala | last post by:
Hello, I am trying to create a shared library on solaris. The inputs to this library is a source file and then 2 static libraries. I need to call code within the shared library in another application which in turn will use the static libraries for further processing. This is the command i am using to build the shared library
3
3231
by: S S | last post by:
Hi Are there some known issues using STL with shared library. Recently I got some crash for which the reason I dont see any, and searching on goolge shown some such issues with shared library. If somebody can help ? Thanks in advance. S
4
2344
by: stuntgoat | last post by:
Hi, I want to start using Python 2.6 and 3000. I have several questions. What, in your experiences, is a functionally elegant solution to installing 2.6 and 3 from source without breaking package dependencies on your favorite Linux/Unix flavor? Is compiling Python 2.6 and 3.0 on a *nix development machine and having it work seamlessly as simple as choosing a particular flavor or are there always going to be package...
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5368
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.