News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

can't start simutrans with pak128 on linux -help

Started by ind-pc-student, September 23, 2010, 02:48:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ind-pc-student

hello fellow users of Simutrans

i have downloaded simutrans 102.2 + pak128 102.0, extracted them to /home/mdvpp folder

opened konsole terminal and typed "./simutrans" it gives me this error:
"./simutrans: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory"

I have already downloaded bzip2-1.0.6 and compiled it without errors

i am currently using mandriva Linux 2010.1 x86_64

any ideas on how i can resolve this problem?

thank you for your time 

prissi

You need 32 bit libraries. This may be also true for SDL, libz, libpng.

ind-pc-student

all other libs are there but i still seem to have the problem with the libbz2.so.1.0 but i find it is correctly installed in the /usr/lib/ directory but the ./simutrans file says shared file libbz2.so.1.0 not there so where should i place that lib so the ./simutrans starts? any ideas?

thanks.

Dwachs

Maybe setting the environment variable LD_LIBRARY_PATH to point to your library path helps?
Parsley, sage, rosemary, and maggikraut.

ind-pc-student

where can i find those environment variables?

what file do i need to open?

thx

inkelyad


ind-pc-student

#6
ldd ./simutrans

        linux-gate.so.1 =>  (0xffffe000)
       libz.so.1 => /lib/libz.so.1 (0xf7703000)
       [color=blue]libbz2.so.1.0 => not found[/color]
       libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xf764f000)
       libSDL_mixer-1.2.so.0 => /usr/lib/libSDL_mixer-1.2.so.0 (0xf75ff000)
       libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf750d000)
       libm.so.6 => /lib/libm.so.6 (0xf74e7000)
       libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf74ca000)
       libc.so.6 => /lib/libc.so.6 (0xf7378000)
       libdirectfb-1.4.so.0 => /usr/lib/libdirectfb-1.4.so.0 (0xf72e1000)
       libggi.so.2 => /usr/lib/libggi.so.2 (0xf7242000)
       libaa.so.1 => /usr/lib/libaa.so.1 (0xf7225000)
       libdl.so.2 => /lib/libdl.so.2 (0xf7221000)
       libpthread.so.0 => /lib/libpthread.so.0 (0xf7209000)
       libmikmod.so.3 => /usr/lib/libmikmod.so.3 (0xf71b6000)
       libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xf71ac000)
       libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0xf716e000)
       libsmpeg-0.4.so.0 => /usr/lib/libsmpeg-0.4.so.0 (0xf7104000)
       /lib/ld-linux.so.2 (0xf7740000)
       libfusion-1.4.so.0 => /usr/lib/libfusion-1.4.so.0 (0xf70f9000)
       libdirect-1.4.so.0 => /usr/lib/libdirect-1.4.so.0 (0xf70e1000)
       libncurses.so.5 => /lib/libncurses.so.5 (0xf7096000)
       libgii.so.1 => /usr/lib/libgii.so.1 (0xf7077000)
       libXxf86dga.so.1 => /usr/lib/libXxf86dga.so.1 (0xf7070000)
       libXext.so.6 => /usr/lib/libXext.so.6 (0xf705e000)
       libX11.so.6 => /usr/lib/libX11.so.6 (0xf6f2c000)
       libgg.so.1 => /usr/lib/libgg.so.1 (0xf6f20000)
       libslang.so.2 => /usr/lib/libslang.so.2 (0xf6e10000)
       libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xf6de5000)
       libogg.so.0 => /usr/lib/libogg.so.0 (0xf6dde000)
       libxcb.so.1 => /usr/lib/libxcb.so.1 (0xf6dbf000)
       libXau.so.6 => /usr/lib/libXau.so.6 (0xf6dbb000)
       libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xf6db3000)

ind-pc-student

i have that libbz2.so.1.0 /usr/lib and copied it to /lib how do i make the system detect it?

inkelyad

And now 'ls -l /lib/libbz2*' and 'ls -l /usr/lib/libbz2*'
Quote from: ind-pc-student on September 25, 2010, 08:08:32 AM
i have that libbz2.so.1.0 /usr/lib and copied it to /lib how do i make the system detect it?
'ldconfig' in root mode.

ind-pc-student

#9
thank you but i am unsure on how can i use that ldconfig command any ideas?

inkelyad


$su
Password: <enter root password>
# ldconfig
exit

Or

$sudo ldconfig

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for user:
$

And you really don't want copy library files like that. It will break security patches/package management for your system.
Right way to fix all this is 'recompile simutrans'.

ind-pc-student

I am the system admin and i am using linux at home, so my computer my rules, i thought open source was about freedom to modify my own system

[I have used linux for over two years and still i have very amateurish knowlegde]

Deleted my copy by using file manager on root mode and replaced it with $ ln -s command from /usr/lib to /lib
still it does not detect the libbz2.so.1.0 that is frustrating.

and i compiled that package from source via:  $ ./configure ## $ su ## $ make ## and ## make install ## all of those commands completed without error messages.

and i dont know how to compile simutrans from src, are there any tutorials for this?

sorry to post so many questions but i won't give up until i get simutrans working on mandriva linux

"never give up never surrender"


inkelyad

#12
Quote from: ind-pc-student on September 25, 2010, 10:09:17 AM
till it does not detect the libbz2.so.1.0 that is frustrating.
Well, you can read output 'strace -e trace=open ./simutrans' to find where it look for it.

Quote
and i compiled that package from source via:  $ ./configure ## $ su ## $ make ## and ## make install ## all of those commands completed without error messages.
Err. Compiling package for system usually is not the same as compiling library distributive. You can end with one extra copy of libbz2 in /usr/local/. Read log of 'make install' carefully.

Quote
And i dont know how to compile simutrans from src, are there any tutorials for this?

See Wiki page

ind-pc-student

#13
created symlink from /usr/lib to /lib now new error message:

./simutrans: error while loading shared libraries: libbz2.so.1.0: wrong ELF class: ELFCLASS64

how to change a elf class to 32?

prissi

You compiled (by default) a 64bit library version of libbz2 which refuses (on linux) cooperation with 32 bit programs.

In your case I would rather try using the package manager or just compile simutrans yourself, it is easy. (As pointed by the wiki post above.)

For libbz2 I would try "apt get libbz2" or "yast install libbz2" whatever your packed manager is.

Depending on your system version, also installing simutrans via packet manager should get all needed libraries.

Frank

you can download a 64bit Linux binary from http://nightly.simutrans-germany.com/

wernieman can certainly create again a binary from version 0.102.2.2

Krzysiekl

I had the same problem.

symlink  /usr/lib/libbz2.so.1 <- /lib/libbz2.so.1.0
fixed the problem.

(/usr/lib/libbz2.so.1 <- /lib/libbz2.so.1
or
/usr/lib/libbz2.so.1 <- /lib/libbz2.so.1.0.0
not helped!)





wlindley

With Fedora 15, this solved the problem:

sudo ln -s /lib64/libbz2.so.1.0.6 /lib64/libbz2.so.1.0

TungstenX

It is 2015 and I'm facing the same problem.  I've tried what was suggested (even the nightly builds) but only got:


./simutrans: error while loading shared libraries: libbz2.so.1.0: wrong ELF class: ELFCLASS64


I'm on Ubuntu 14.04 (thanks to Windows 10  ;)) 64 bit.
Xuǝʇsƃun┴

Vladki

You need 32-bit libraries.

apt-get install libbz2:i386

I'm not sure about the exact package name. And more libraries may be necessary. Have a look at apt-cache show simutrans to find all dependencies.

TungstenX

Thank you Vladki for pointing me in the right direction.

Before the fix, I got this (2 not found libraries):
$ ldd ./simutrans
linux-gate.so.1 =>  (0xf774f000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7710000)
libbz2.so.1.0 => not found
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf76f4000)
libSDL-1.2.so.0 => not found
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf757d000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7530000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7512000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7356000)
/lib/ld-linux.so.2 (0x565b9000)


On Ubuntu 15.10, 64bit, I had install the 32 bit versions of bzip2 and libsdl1:

sudo apt-get install bzip2:i386
sudo apt-get install libsdl1.2debian:i386

Xuǝʇsƃun┴