Why does linux hate me?


(vidar_nelson) #1

I downloaded the 2.4 build for linux, unzipped it, with trembling hands I wrote ./blender and pushed enter…
./blender: error while loading shared libraries: libpython2.4.so.1.0: cannot open shared object file: No such file or directory
:frowning:
I have python version 2.4 installed, becouse when I type “python” I get the following:
Python 2.4.1 (#1, May 16 2005, 15:15:14)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

I’m running fedora core but I’m a newbie to it.


(OTO) #2

Hello

please, Linux hates no one!
Linux is peace and love :slight_smile:

In your /usr/lib you probably have a libpython2.4.so.1 file ( or something like that)
If yes, make a symbolic link to the desired file name
Do you know how to do that?

Open a n Xterm or console, change to root, and type

ln -s /usr/lib/libpython2.4.so.whateverisyourfile /usr/lib/libpython2.4.so.1.0
That should work
Bye


(Fenix) #3

Maybe the share lib name in your distribution has other name.

Looking form libpython* in your /lib/* dir.

If you found one, and the name is not the same… make a simbolic link like this:

ln -s [name of the real lib] [name of the lib in Blender]


(vidar_nelson) #4

I didn’t have any libpython file in /user/lib. I had both a libpython2.4.so.1.0 and a libpyhton2.4.so in my /usr/lib64 however. So I made a symbolic link of the *.1.0 in my /usr/lib, but it didn’t help. Are you sure that is where it’s supposed to be located? I made a link in my /lib too, just to be sure, but I still get the same crappy error mesage :frowning:


(mcc) #5

Hi,

Yes, i agree…Linux does not hate anyone… :O)

Please dont add symbolic links in any /lib/ directory
BY HAND. This /may/ confuse the whole system and
if you mistype something you can screw up a lot of
other things.

For makeing system conform links for share libraries there
is a special command.

Become root.
Be CAREFULE (root ha the permissions to even delete
your Linux kernel and the whole filesystem)

Submit this command:

ldconfig

This comand steps through all library paths and make
all missing symlinks for for all shared libraries found.
The paths searched through are listed in

/etc/ld.so.conf

So…if the directory, where libpython* is in, is not
listed in that file, no ldynamic ibrary loader will ever find it!

If this doesn not help try the follwoing:

strace -o liblog.txt blender

This command will trace all system calls of blender into
the Linux kernel and writes its output to liblog.txt

Terminate blender again and look into liblog.txt

Search for system calls ending with

= <any negativ number>

These calls do fail. Not any fail is fatal, since some calls
try to check certain circumstances and failing means
only the existence of a certain state.

Search for libpython. There will be a path mentioned, where
the dynamic loader awaits libpython.

Check your system, whether libpython is really there.

The best way to get a blender, which is compliant to your
system instead of makeing your system compliant to
blender which is in general a bad idea since you may break
a lot of other thing ( and for that Linux will REALLY HATE
you ;O) ;O) ;O)))) is to download the source of Blender
2.40alpha and compile a blender yourself.

This way all different paths are fixed automagically, since
blender now knows where to find for example Python
in your system.

Good luck !
Linux is love and peace!
mcc


(pinhead66) #6

hello mcc

I switched over to linux recently too, and compiling and make and stuff are like chinese to me

I’m planning on trying to compile something simple from source code before I try to compile blender

I’ve read the stuff about compiling blender, but since I have no code knowledge at all, I’m really at a loss.

I see te advantages of compiling stuff yourself, but haven’t found detailed enough tutorials, because in a lot of howto’s and other information, a lot of knowledge is asumed, which a noob like me doesn’t have

anyway,

if any of you have links to realy realy noob linux introductions to compiling stuff, it would be much appreciated

thanks

greets

pin


(vidar_nelson) #7

Yeah! I have tried to compile some stuff (running the “./configure” and the “make”), but I allways get thousands of error meessages :expressionless:

Anyway, thanks mcc, I’m going to try it out right away :smiley:


(vidar_nelson) #8

Heh, I realy suck at this :frowning:

/etc/ld.so.conf:

include ld.so.conf.d/*.conf

/usr/lib/wine

strace -o liblog.txt blender:

open("/lib/tls/i686/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpython2.4.so.1.0", O_RDONLY) = 3
read(3, “\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \376\2\231”…, 512) = 512
close(3) = 0

open("/usr/lib/tls/i686/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpython2.4.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)

Does this mean that there must be a “libpython2.4.so.1.0” in al those places?

Linux realy does hate me :frowning:


(phlip) #9

“include” in most config files usually means that the contents of the file mentioned is included in the config file itself - look at all the files in the ld.so.conf.d dir, see what’s there

I wouldn’t think so, just one should be enough. However from that it looks like it did find one (/lib/libpython2.4.so.1.0) so I’m not entirely sure what it’s complaining about…


(vidar_nelson) #10

So, basicaly this means that I could a a file called something.conf to the ld.so.conf.d/ directory and write the path to the libpython in that file?


(mcc) #11

Hi Linuxxers !

First steps are done now – means: Most “othersc” often are crying “I will back my [OK][CANCEL] decision maker!” – you dont. You tried the heavy material, get confused BUT YOU DID NOT GAVE UP! That is really fine (NO sarkasm! PURE truth! :slight_smile:

What all does this means…

First of all the dynamic (shared) library loader mechanism
of Linux: Shared libraries can be compared with the DLL-
stuff under Windows ™.

A starting programm asks this mechanism: “Hey, ld, I want
libpython-eomthing.so – load it for me, please!”.
ld looks into its notebook and checjks, whether it had
loaded this lib already for another program (this is why
it is a “shared” library, since it is shared among different
processes). If so, it does nothing and returns back the
entry point to the calling program. If it does not, it looks
into /etc/ld.so.sonf, where (in what paths) it should look for
it. It looks in any path until it will find the library. That’s why
there are so many “Not found” “”“errord”""" in the strace log file.
BUT if – after all – there is no final “GOT IT!” of ld…it
remains an error.

Blender may run with python 2.4 but it does not compile
with it!!! scons – the python equivalent of ./configure –
does not like python 2.4 that much (at least on my machine).

What to do next?

I would suggest the following:
Submit the commandline
ldconfig -p | grep -i libpython | awk ‘{ print $4 }’

which searches your system for libpython.
If it finds anything like that, it will print out the location.
If nothing is found. next step is to search the whole
system (as root):
cd /tmp
find / -name ‘libpython*’ -ls > libpython.log.txt
less libpython.log.txt

If again nothing appropiate is found you have to install
python (2.3) AND (if you dont compile python yourself)
the development package of python (inlcuding the headers
for compiling against libpython).

Then after all this (python is installed) you can check as
follows:
ldd which python which prints any lib python tries to
load including libpython.

Now do the same with blender:
ldd which blender.
Take a look, where blender tries to find libpython.
If both paths given by python and blender for libpython
are different…you either have to compile blender yourself
to adapt the resulting executable to your system’s layout
(good) or (very bad) make a copy of libpython* to the path
blender is looking for it. The last choise is really the last
choice because other programms may get confused.
Dont forget to run “ldconfig” after all that as root!
Before doing so try to add the path, where python finds its
library to /etc/ld.so.conf (just below /usr/lib/win – just
as a test, whether it works…nothing gets broken that
way.

And:
Compiling blender is – provided that there is a correct system configuration – nothing more than
submitting the commands

“scons” (now take between 20 and 25 coffees…this takes
a longer time)
and then as root
“scons install”

You can nothing loose but a little of your time and you
can win a deeper knwoledge of the “LINUX inside”. :O)
You can nothing hurt of your system before hitting
“scons install” – and who would do so, if “sons” had failed
before ???

I know that starting this way of Linuxxing is sometimes
tidous and frustrating. And I often get frudtrated too,
if something fails to compile or install because of any
bug in ./configure, my system or (most badly) “somewhere”.
Just this evening I shot my hole system while trying to
install a newer glibc. Fingers crossed – I have had a
backup – but I lost the whole sunday…on the other side,
I would have no job without that what I have learned from
Linux.

So, please, give this system a chance and try out the
“real way of Linux” (ok, very BIG words. sorry)…

But it so much more exciting to explore the deep inside
of an operating system and to learn how to tweak any
little aspect as to press [OK][CANCEL] all the time.

Oh, I forgot: There are some forums in the internet,
where you can ask linux specific question. Stay
away from distribution specific forums, if you system
is NOT of that distribution. You always will get answers,
which may only work on that specific distro.

For german speaking readers:
http://www.linux-community.de/
For all speaking English:
http://www.linuxquestions.org/

Good luck and success!
And: There are no dumb questions – there are only
dumb answers.
And (2): Who, who do not ask, will get no answers…

Keep hacking!
mcc

(sorry for this longish thing of bad english…)


(vidar_nelson) #12

Wow! you should write a tutorial 'bout this :o
I didn’t get very far however:

ldconfig -p | grep -i libpython | awk ‘{print$4}’]

bash: ldconfig: command not found

And that’s strange, becouse I belive it worked before :-?

I DEMAND A RPM! :<


(vidar_nelson) #13

I tried the linuxfile that used python 2.3, but it just said “segmentation fault” :frowning:

And I don’t know where to download the sourcecode for the 2.4, so I can’t compile it either…

NOW!


(phlip) #14
export CVSROOT=:pserver:anonymous:@cvs.blender.org/cvsroot/bf-blender
cvs login
cvs -z3 checkout blender
cvs -z3 checkout lib/linux-glibc2.3.1-i386
cd blender
scons

You’ll need to install cvs and scons if you don’t have them already, of course.

The first time scons runs, it creates a config.opts file, which contains the configuration that blender will build with - you might want to cancel scons after starting it the first time, and edit config.opts to make sure it is correct.


(tuinbels) #15

I am really wondering what version of fedora you are running, since I have fedora core 4 installed (with python 2.4) and both blender 2.40alpha and earlier versions (without external python support) run out of the box.

I never needed to compile anything to get blender to run on fedora.

What do you get when you type “uname -a” in a konsole?

There are btw RPM packages for blender 2.37 for fedora core 3 and 4 in the “extras” repositories.
Typing “yum install blender” in a konsole should install a working version of blender 2.37 for you fedora distribution.

And you can also find RPM packages in de RPMforge repositories here. You could ask them to make a rpm package for blender 2.40…


(mcc) #16

Hi,

Programs, even when installed, can only be executed, when
found. Sounds simple, don’t it ?
BUt…

The “but” looks like that:
If – for example – a system related tool like “ldconfig” couldn’t be found (“command not found”), it can have two reasons:

1.) It is really not installed on the system.
2.) It is there but ASH/ZSH/TCSH/SH or what shell ever
did not found it.

For 1.) Install the program yourself. :O)
For 2.)
Type the following
echo $PATH

and you will get a list of paths (seperated by ":"s) where
the shell will search for a command.

Why it is possible, that “suddenly” a command isn’t there
anymore?
1.) You killed the system and have deleted the command.
:slight_smile:
2,) You have worked as root (you should only do that if
it is absolutely necessary) and now – as user – the
command “has gone”.

Reason: The settings for PATH differ for both accounts.
Why?

There are certain places, where “dangerous” and “system near” commands are installed. Those are most often
/sbin and /usr/sbin.
“ldocnifg” is such an “system near” comand. For checking
try the following:
Type directly (instead of ldconfig)
/sbin/ldconfig and if this does not help
/usr/sbin/ldconfig

if this does not help either, login as root and type
which ldconfig

which gives you the path to ldconfig.

Be careful now. Mistyping can result in a not working
user account! :slight_smile:

Login as user. If bash is your shell (try echo $SHELL)
load $HOME/.bashrc in your favourite editor. Search
for something like

export PATH=…

If found add the path you found for ldconfig to that setting
like that (supposing ldconfig is installed as
/usr/sbin/ldconfig

Before (example !!!)

export PATH=/usr/bin:/bin

After your fix (example!!!)

export PATH=/usr/bin:/bin/:/usr/sbin

after that DONT leave the editor or close the file! Only
SAVE the file.

Start a shell and test, whether everything is working fine.
If so…be happy.
If not…dont worry.

Check the settings again. Every path has to be separated
by ":"s.

What to do if there are no “export PATH=…” thingy there?
You have to do the “My Name is Bond, James Bond”-trick (which is more like a “My Name is Bond, Bond James”-trick :wink:

Add the following line to the end of your .bashrc file:

export PATH="$PATH:/usr/sbin"

(you see, why this is like “My Name is Bond, James Bond” ??? ;O)

Check the setting as shown above.

If eveything works fine, you can leave the editor.

Why is all this a little “dangerous”???
If you add for example (DONT TRY THIS!!!) to you .bashrc
exort PATH=";/urs/bni,/bsin" (mistyping nearly everything)
NO command cannot be found anymore INCLUDING THE
EDITOR TO FIX THAT PROBLEM!.

For this and a lot of other reasons similiar to this it is very
handy to have a KNOPPIX bootable CD on the desktop.
If you shoot the system by mistyping something very badly…DONT WORRY! :slight_smile:
Boot into KNOPPIX (it is a nearly complete Linux environment!) search for the partition, where the file is,
fix the file, leave KNOPPIX, boot the original system and…
TADA! Here we are again !!! :slight_smile:

This has a second good sideeffect: One gets more adventurous and brave in tweaking the system. While you are more tweaking you get a better and deeper knowledge of Linux. Better and deeper knowledge of Linux means: You do lesser mistakes. Makeing lesser mistakes means more success and lesser Boot-Into-KNOPPIX (NOTHING against KNOPPIX!!!). And after all: More fun with Linux means: Lesser feelings of being hated by Linux ;O))

By the way: There are better shells as bash. Look at
zsh. Dont install this fo root, though, since all system
boot scripts are executed under root permissions.


"I tried the linuxfile that used python 2.3, but it just said “segmentation fault”

Sorry, I dont undertand this…what do mean with
“linuxfile” ???

You can find nearly everything for Linux at

www.freshmeat.net (NO, it is NO XXX-site ;O)

Keep hacking! :O)
mcc


(vidar_nelson) #17

That’s strange, becouse I’m using FC4 too, and I just reinstalled the whole shit… I still get those errors!

I know, that was the only way I managed to get the 2.37 to work :slight_smile:

oops! sorry, I ment blender, blender for linux :expressionless:

@mcc: I’m sorry, but this is starting to become to much for me, take this for example:

Everything I try fails :(.
I’m realy thankfull for all your help, but my computer (it might not be linux, maby it’s the whole computer :wink: ) doesn’t seem to want me to use blender. I’ve tried everything you told me to, but I still havent gotten anywhere :frowning: .
And I can’t download that freaking cvs either, bash complains, say’s he doesn’t know the word cvs!

One last question, one that can realy save my day is:
what should I do (and try to explain it in a VERY, VERY simple way) when I know where the libpython file is, but blender doesn’t?

If you say that I should compile it myself, I won’t succed unless you tell me where to find the files to compile. I’ve googled for cvs, but there is so many files and stuff out there.

Btw, just becouse Linux hate’s me, it doesn’t mean I hate Linux :smiley:


(tuinbels) #18

That’s strange, becouse I’m using FC4 too, and I just reinstalled the whole shit… I still get those errors![/quote]

Then the only thing that could make a difference is that you run the 64 bits version of FC4 (I have the plain 32 bit version) and the official compiled version of blender has problems with those extra 32 bits …
So you would have to compile blender yourself or wait for the RPM providers to update their builds…

If bash says it doesn’t know what cvs is, means you didn’t install it when installing FC4.
“yum install cvs” as root should solve that problem.

Then go here: http://projects.blender.org/cvsx/?group_id=9 for instructions on how to obtain the latest source code (the source code of the 2.40alpha build is not available as a downloadable package it seems…)


(vidar_nelson) #19

Maby I should get the 32 bit version (don’t realy know the difference, 64 sounded better, so I went with that)…
Any way, I think I’m getting somewhere (I must admitt that this is actually pretty fun :smiley: ), but I did this:

And my computer smiled at me and said with an evil voice:

Might this be becouse I have python 2.4 installed? and in that case, how do I remove it WITHOUT damaging the whole system (if that is possible)


(tuinbels) #20

You can’t remove python 2.4. from FC4

Looking at the output, I think you don’t have gcc (gnu c compiler) installed, since it says “sh: gcc: command not found”

And you will have to install the header files for the different libraries that blender uses (png, sdl and some more)

But I think it is better to ask these kind of questions over at the blender forums here: http://www.blender3d.org/forum/ where you will get better answers.

Wim