473,700 Members | 2,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ld.so.1: fatal ImportError: ld.so.1 No such file or directory

solaris/linux admins/rookie_develope rs that battle with this error are
probably all frustrated when it happens. i bet you're also somehow
frustrated by this seemingly unsolvable error :-) ...take it easy,
it'll go away once u've learned how to play around with a few things
on your system and reorganised. i'm particulary a solaris junkie, but
linux is my admiration. the issue here is Not the OS/Software, but
rather the concept. first of all , i've learned that people who
normally hit this error are those that somehow DOWNLOADED some
packages (so-called free/open-source) from the internet with a hope of
using the package to solve some inhouse problem. normally the package
installs FINE but just when you try to run it... BOMB!! and then u
spend 5 days battling with it and NOTHING good comes out of it and
finally, you come here ...still frustrated :-( chill ..it happened to
me plenty of times too. nuff said...

here's a typical extract of the ghost you've seen. you've probably
been battling with this for quite a while...
ld.so.1: fatal
No such file or directory
ImportError: ld.so.1

first you have to appreciate something about dynamic objects. dynamic
objects is a fancy term for programs that use DLLs (both windows and
unix programs can have DLLs). if you're Not familiar with dynamic
objects, then pls read section-3 which is right at the END of this
post. otherwise start with section-1 right here below...

section-1 (John Hunter's opinion)
############### ############### ############### ############
This problem typically arises when the program was compiled and
installed in one environment and executed in another. When it was
compiled, the compiler could find libgcc_s.so.1, but when it is
executed, the shared library is not in your LD_LIBRARY_PATH .
You probably do not need to recompile your program (unless it was
compiled on another system or with a cross compiler). First try and
find the dir on your system in which libgcc_s.so.1 resides. Three
suggestions:

If you have gnu findutils, just do 'locate libgcc_s.so.1'. Otherwise,
try:
# ldd /path/to/your_program
This will list the shared libraries that your_program needs and where
they are. If you can't find it that way, try:

# find /usr -name libgcc_s.so.1
or
# find /opt -name libgcc_s.so.1

you've GOT to finnd the missing file! if you still can't find it, I'll
guess that it's not on your system and your_program was compiled on
another machine. If you do find it here's how to modify
LD_LIBRARY_PATH so you can see it when you execute your_program.
Suppose you found it in /some/dir/lib

If you are a csh/tcsh user
# setenv LD_LIBRARY_PATH /some/dir/lib:$LD_LIBRARY _PATH

the line above is One long line, it's NOT two lines, it might be
wrapping on this newsgroup screen, so make sure you type it in as One
long line!..and also same applies to the other ones below.

If you are a bash/bourne/ksh user
# export LD_LIBRARY_PATH =$LD_LIBRARY_PA TH:/some/dir/lib

This command above should go in your rc file, eg, ~/.tcshrc, ~/.cshrc,
or ~/.bashrc, ~/.kshrc. Now open up a new shell/xterm, and try typing
your_program again. just run it without any parameters.

If you are still having trouble, make sure that your environment
variable are set correctly with:

If you are a csh/tcsh user
# setenv | grep LD |more

If you are a bash/bourne/ksh/zsh user
# echo $LD_LIBRARY_PAT H

You should see the dirs you entered in for LD_LIBRARY_PATH .

Good luck,
John Hunter

section-2 (my opinion)
############### ############### ############### ############
in addition to john's stuff above, there is a trick about unix's
symbolic links which i'm gonna base my opinion on. my opinion
therefore applies in the case where the xx.so.x file is actually THERE
on your system but the error still says that
'No such file or directory' even when LD_LIBRARY_PATH is properly set
and exported.

what you have to do is to run the ldd command again (as above in
john's post) and look carefully at what it reports. Not ALL of the
xx.so files should be reported problematic, ONLY SOME of them will be
reported as 'Not found'. now my opinion revolves around the idea of
finding the place/directory where the GOOD ones are sitting. once
you're in this directory, u can then make a symbolic link to the xx.so
that's giving you a problem. NB: the link must be in the
place/directory where the good xx.so files are sitting. this will fool
the OS/ld into thinking that your missing xx.so file is actually now
in the right place. NB: DON'T move your troublesome/missing xx.so file
into the place/directory where the good xx.so files are sitting
....just create a symbolic link in the good directory, the link will
just point to the troublesome/missing file whereever it is sitting.

let's say for instance that the '/etc/maria.so.1' file is giving you
trouble and is being reported as 'No such file found' and u've tried
everything such as setting LD_LIBRARY_PATH and you're tired. now let's
be explicit and say that you get the error when you run the 'python'
command. the command you're running does Not matter, it could be
'openssl' or 'samba' or 'ssh' or 'wget' or 'apache' or even 'java'
itself, the error is the most interesting thing here cuz it's likely
to always be the same (ld.so.1: fatal No such file or directory).
let's assume that u're running the 'python' command. what you would
then do is
# ldd /full/path/to/python_binary
now observer carefuully what the ldd command above reports to you.
it'll show that SOME of the xx.so.x files are Not found. good. now
FORGET the missing one, now look at those that are OK. use the find
command to find onne/more of those ones that are OK, go to the
directory where you found one of them (let's say it's /usr/lib), once
you're there, create a symbolic link to your missing file
(/etc/maria.so.1). i hope you know where your missing xx.so file is
sitting (/etc/maria.so.1), cuz you've probably confirmed taht it DOES
EXIST indeed and you know exactly where it is. so create the link to
it as follows...
# cd /usr/lib
in this case above, /usr/lib is our directory with good xx.so files.
# ln -s /etc/maria.so.1 maria.so.1
in this command above, it might be necessary to use FULL paths.

now make sure that your LD_LIBRARY_PATH is set properly and EXPORTED.
now fire up your 'python' or 'samba' or 'apache' or whatever command
that complained about the missing xx.so.x. what does it say NOW??

it might now complain about ANOTHER xx.so.x (Not the same one as the
first one anymore), well... i guess u've figured out how we've solved
the problem for the first one. do the same for the second one and the
third one and so on. just create a link for it in the directory with
good xx.so files just like the first one. repeat this process for all
your missing xx.so.x (as long as you know that you have them on your
system). yeah, that's all about my suggestion.

should my suggestion fail, well, then you have a lot to read about ld,
etc. Listen, i know man pages are Not the most exciting thing to
read, but you have to read them with an open mind (Don't try to rush
into finding quick answers cuz that's gonna frustrate you more) ...
try section-3 below, but then you're on your own. i'm Not gonna
comment on anything about section-3 below. after you read, hopefully
something will click in your mind about what's happening on your
specific system.

as a semi-final Note: DONT clutter your system, when u make the links
above, do them one-by-one, DON'T use a shell script. DON'T create
links for any xx.so.x files that are NOT causing you trouble. a rule
of thumb is to always keep a text file (Notepad) so that you have a
log of ALL the links you've made cuz this process of creating symbolic
links for UNresolved xx.so.x files will have FUTURE consequences and
you DON'T wonna be caught by suprise in the future when something that
WAS working in the past is NO LONGER working ..while the new stuff is
WORKING just ok :-) it's therefore important to REMEMBER that you once
created an override link for a troublesome library file and this
override link could be the cause of trouble with something else in the
FUTURE, with a clear mindset (keeping logs of ALL previous/original
settings) you could easily reverse the system's config and walk away
clean. so it's important for you to be able to REVERT even when the
problem gets solved today and things seem to be working ok!!

as a final-FINAL Note: i'm not responsible for any files that get
deleted or that disappear from your system when you use my advice cuz
they way i see it, when u use my advice you're somehow
hacking/overriding your system's config. u do this solely at your own
discretion/risk. you came here without my invitation, and you're
reading this without my invitation either. i did Not send u this info
by email, etc. so just keep me out of it.
section-3 (general info on ld)
############### ############### ############### ############
http://mirrors.ccs.neu.edu/cgi-bin/u...-cgi?ld.so.1+1
http://www.unidata.ucar.edu/cgi-bin/man-cgi?ld.so.1+1
http://bama.ua.edu/cgi-bin/man-cgi?ld.so.1+1

_______________ _______________ _____________
Moses Motlhale - Solutions Architect
24th Century Solutions, South Africa.
Jul 18 '05 #1
6 16640
o'seally schreef:
[rant]
_______________ _______________ _____________
Moses Motlhale - Solutions Architect
24th Century Solutions, South Africa.


Well, I had use CTRL-F to find the references to python --
my first impression was that python was not even referred to in
any way. Still, the question that comes to mind is:

exactly what solution are you trying to find
for exactly what python problem?

Ruud de Jong, private python enthousiast

Jul 18 '05 #2
i'm Not trying to find a solution for a python problem, i'm in fact
posting a solution to the notorius "ld.so.1: fatal ImportError:
ld.so.1 No such file or directory" error that many people are
complaining about on the newsgroups/internet. when they search on
google for this kind of error, they'll find a link to my
comments/advice/suggestions. i would think that would be very helpful
to them.
Jul 18 '05 #3
i checked my original posting again. the word 'python' appears a
couple of times in it, so python is indeed being referred to. read my
original posting slowly/carefully again, you'll see it.
Jul 18 '05 #4
o'seally schreef:
i'm Not trying to find a solution for a python problem, i'm in fact
posting a solution to the notorius "ld.so.1: fatal ImportError:
ld.so.1 No such file or directory" error that many people are
complaining about on the newsgroups/internet. when they search on
google for this kind of error, they'll find a link to my
comments/advice/suggestions. i would think that would be very helpful
to them.


Well,

This was not obvious from a first reading. I read your original post
again, and basically you say:

Problem: fatal ImportError: xx.so.n No such file or directory
Solution: make the file xx.so.n visible through LD_LIBRARY_PATH

Duh. This is essentially identical to the solutions that have been
offered time and again whenever this or a similar problem is reported.
Your post differs from most others because:
* it was not in response to a problem, making it more difficult to
discover the intention of the post;
* you needed over 100 lines of text to provide this solution;
* the liberal use of CAPITALS (which gives your post a rather
spam-like appearance);
* the digression on irrelevant subjects (why bring free or open source
software in the discussion?)

Because of the low signal/noise ratio, I did not recognize this
to be a solution for a problem that happens from time to time.

On the contents of your post: you suggest to create symbolic links
in one of the directories in LD_LIBRARY_PATH to make the required
files visible, instead of appending their directory
to LD_LIBRARY_PATH . Be aware that symbolic links make the
files visible to *all* applications -- you may not always want that.
Manipulating the LD_LIBRARY_PATH environment variable gives you
more flexibility, and you also don't need root privileges to do so.
You can also choose to manipulate LD_LIBRARY_PATH via a shellscript
wrapper for the actual program you want to run; this is especially
useful when there are naming collisions.

Regards,

Ruud.

Jul 18 '05 #5
o'seally schreef:
i checked my original posting again. the word 'python' appears a
couple of times in it, so python is indeed being referred to. read my
original posting slowly/carefully again, you'll see it.


I did not claim that python was not referred to -- I said that
that was my first impression, as you could have read in my
first reaction. No need to read slowly or carefully, you cannot
really miss it -- unless you want to.

Jul 18 '05 #6
Ruud de Jong <ru**********@c onsunet.nl> wrote in message news:<40******* *************** @dreader2.news. tiscali.nl>...
o'seally schreef:
i checked my original posting again. the word 'python' appears a
couple of times in it, so python is indeed being referred to. read my
original posting slowly/carefully again, you'll see it.


I did not claim that python was not referred to -- I said that
that was my first impression, as you could have read in my
first reaction. No need to read slowly or carefully, you cannot
really miss it -- unless you want to.


==>it was not in response to a problem, making it more
==>difficult to discover the intention of the post;

google/usenet groups are Not only for *solving problems* or nagging
people about this and then that, and then that, etc. newsgroups are
also useful for sharing information Openly. always bear in mind that
what you find useless and totally unnecessary can come out to be the
most useful advice/opinion for *someone else*, ..cuz even if it might
be infested with a lot of junk, it might contain just One Word of
advice that someone has been needing for many years!
the intention of this post is therefore simple:.. should someone hit
this problem and start searching on google/teoma/etc, he is very
likely to be interested in any place/page that contains the words
equivalent to those in the error he saw. most pages DON'T have enough
detailed info about this error. check it out yourself, try and search
for pages with Detailed info about this specific error and you'll find
very few.

many times even when LD_LIBRARY_PATH is set **and exported** this
problem will still manifest. check the posts around and you'll find
many people that say that they **Have** set and exported
LD_LIBRARY_PATH and it gave no luck. the reason is because it's hard
to tell when ld is running and calling/loading many .so files which in
turn load more .so files ..it's hard to track whether this variable is
up-to-date in all these calls. in fact, many times the updated
LD_LIBRARY_PATH does Not seem to maintain its updated value through
nested/stacked calls that all result from ld's first run/call.
==>you needed over 100 lines of text to provide this solution;

of course i need over 100 lines. does this mean those who benefit from
my solution will have to type a bash/unix script of 100 lines? ..No
no, they'll simply create symbolic links. but then why did i Not just
type one line and say "create symbolic links" ? well, many newbies
Don't necessarily have the in-depth knowledge of doing this
neatly/smoothly. some of them would ask me ...symbolic links to what?
many developers are Not sys admins and therefore they may Not be that
quick/up-to-speed with symbolic links. i realize i Can't cater for
every layman, but at least i should go as low/grassroot as i can.
==>the liberal use of CAPITALS (which gives your post
==>a rather spam-like appearance);

i apologize for my liberal use of caps, sorry for the liberal use of
caps, i simply had to ensure that words like *not*, *can't*, etc are
Not easily skipped by those fast readers. but a person who has spent
nights battling with an ld problem will consider anything that seems
to talk about the error he's battling with. he'll try anything to get
that error fixed, and he'll keep searching even in spam-like places.
well, at least it **appears spam-like**, it is Not quite spam.
==>Duh. This is essentially identical to the solutions
==>that have been offered time and again whenever this or
==>a similar problem is reported.

once again read my post slowly/carefully. the advice about
LD_LIBRARY_PATH is Not what my opinion is centered around. i clearly
stated at the beginning of it that it is someone else's opinion (John
Hunter's opinion). there is a place that's clearly marked as "my
opinion" in addition to John's opinion. my opinion is centered around
symbolic links. now i want you to find out (search the net) and
discover for yourself how many posts are *identical* to my opinion. to
your suprise, you will Not find many. Do it now. ..on the other hand,
talking about identicals ..you'd be surprised to find out how many
places on the net have an **Identical** copy of the unix man pages,
you'll be truly amazed :-)
==>Be aware that symbolic links make the files visible to
==>*all* applications -- you may not always want that, bla bla bla.

once again in my original post i said ...
as a final-FINAL Note: i'm not responsible for any files that get
deleted or that disappear from your system when you use my advice cuz
they way i see it, when u use my advice you're somehow
hacking/overriding your system's config. u do this solely at your own
discretion/risk. you came here without my invitation, and you're
reading this without my invitation either. i did Not send u this info
by email, etc. so just keep me out of it.
==>the digression on irrelevant subjects (why bring
==>free or open source software in the discussion?)

i did Not bring these into the discussion. they're the most
insignificant words in my post. but why didn't i leave them out then??
...well, i have to use words when i type. what would u say if i said
your liberal use of the word 'appearance' in your reply above is a
digression from this topic to something irrelevant? wouldn't you
quickly turn around and say to me ...the word 'appearance' in your
reply above was simply an insignificant word. but what if i picked out
that specific word and dwelled on it? wouldn't you find me
UNbelievable? well, man you have to use words when you type/post. are
you aware that even the word 'you' can be isolated and criticized as a
digression by anyone who reads your post and *chooses* to do so.
_______________ _______________ _______________ ____
Moses Motlhale - Solutions Architect
24th Century Solutions, South Africa.
Jul 18 '05 #7

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

Similar topics

2
17685
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
0
1275
by: mr19 | last post by:
I'm running into import problems trying to create a package that is similiar in layout to the one in the docs described here: http://www.boost.org/libs/python/doc/tutorial/doc/html/python/techniques.html#python.creating_packages So my package layout is as follows: xyzzy/ __init__.py
0
2047
by: Greg | last post by:
Hi, creating template1 database in /var/pgsql/data1/base/1... DEBUG: invoking IpcMemoryCreate(size=1081344) FATAL: shmat(id=1179648) failed: Invalid argument What's the problem why is shmat passed a wrong id? I temporarily need Postgres running on Windows98 just to write a client app and I'm stuck at this point.
4
5647
by: ARF | last post by:
I'm testing AutoCAD 2005 automation via VS2005 Pro C++/CLR and I'm getting fatal compiler errors. I start with a default C++/CLR class library project and modify it by adding the following references: acdbmgd.dll acmgd.dll the entire source for the default library header file is:
3
24330
by: gmax2006 | last post by:
Hi, I am using RedHat Linux 4. and I developed an oracle 10g based application by using cx_Oracle (cx_Oracle-4.1-10g-py23-1.i386.rpm) and Python 2.3.4. When I run the application through direct console connection, It works perfect. But, when I schedule a crontab job to run the application, It logs this
2
2176
by: Adam Blinkinsop | last post by:
I'm writing a set of modules to monitor remote system services, and I'm having a problem running my test scripts. When I pass the scripts into python, like so: -- $ PYTHONPATH="${TARGET_DIR}" python test.py -- I get an ImportError:
1
3768
by: kvarada | last post by:
Hello Experts, I am building my application on WinNT.4.0_i386_MSVC.7.1 platform. When I build the application on a stand alone machine, it builds fine. But when I build the same application from a linux box using rsh it gives me the errors below Microsoft (R) Development Environment Version 7.10.3077. Copyright (C) Microsoft Corp 1984-2001. All rights reserved. ------ Build started: Project: SigComp, Configuration: Release Win32 ------...
1
6377
by: kyosohma | last post by:
Hi, Recently I began my journey into creating executables. I am using Andrea Gavana's cool GUI2EXE program which works very well and that is a GUI for py2ece. I am also using Inno Setup to create a script/executable. Anyway, today I am putting the program to the test with some volunteer testers and
6
1785
by: Samuel | last post by:
Hi, Given the following directory structure: --------- |-- Obj.py |-- __init__.py |-- foo | |-- FooTest.py | `-- __init__.py
0
8712
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
8639
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8952
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
7794
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
6555
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
4649
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3082
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
2
2375
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.