The International Simutrans Forum

 

Author Topic: can't start simutrans with pak128 on linux -help  (Read 16272 times)

0 Members and 1 Guest are viewing this topic.

ind-pc-student

  • Guest
can't start simutrans with pak128 on linux -help
« on: September 23, 2010, 02:48:59 PM »
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 

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10545
  • Languages: De,EN,JP
Re: can't start simutrans with pak128 on linux -help
« Reply #1 on: September 24, 2010, 01:56:48 AM »
You need 32 bit libraries. This may be also true for SDL, libz, libpng.

ind-pc-student

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #2 on: September 24, 2010, 12:49:54 PM »
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4858
  • Languages: EN, DE, AT
Re: can't start simutrans with pak128 on linux -help
« Reply #3 on: September 24, 2010, 05:50:36 PM »
Maybe setting the environment variable LD_LIBRARY_PATH to point to your library path helps?

ind-pc-student

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #4 on: September 24, 2010, 06:23:19 PM »
where can i find those environment variables?

what file do i need to open?

thx

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: can't start simutrans with pak128 on linux -help
« Reply #5 on: September 24, 2010, 11:54:08 PM »
Please post 'ldd ./simutrans'

ind-pc-student

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #6 on: September 25, 2010, 07:59:09 AM »
ldd ./simutrans
Code: [Select]
        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)
« Last Edit: September 25, 2010, 04:15:31 PM by vilvoh »

ind-pc-student

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #7 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?

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: can't start simutrans with pak128 on linux -help
« Reply #8 on: September 25, 2010, 08:32:16 AM »
And now 'ls -l /lib/libbz2*' and 'ls -l /usr/lib/libbz2*'
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

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #9 on: September 25, 2010, 09:15:45 AM »
thank you but i am unsure on how can i use that ldconfig command any ideas?
« Last Edit: September 25, 2010, 09:29:05 AM by ind-pc-student »

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: can't start simutrans with pak128 on linux -help
« Reply #10 on: September 25, 2010, 09:45:07 AM »
Code: [Select]
$su
Password: <enter root password>
# ldconfig
exit
Or
Code: [Select]
$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

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #11 on: September 25, 2010, 10:09:17 AM »
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"

 

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: can't start simutrans with pak128 on linux -help
« Reply #12 on: September 25, 2010, 10:18:56 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
« Last Edit: September 25, 2010, 10:24:14 AM by inkelyad »

ind-pc-student

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #13 on: September 25, 2010, 11:04:59 AM »
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?
« Last Edit: September 25, 2010, 12:10:43 PM by ind-pc-student »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10545
  • Languages: De,EN,JP
Re: can't start simutrans with pak128 on linux -help
« Reply #14 on: September 25, 2010, 12:26:31 PM »
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.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: can't start simutrans with pak128 on linux -help
« Reply #15 on: September 25, 2010, 12:56:07 PM »
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

  • Guest
Re: can't start simutrans with pak128 on linux -help
« Reply #16 on: December 17, 2010, 09:50:20 PM »
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!)
 




Offline wlindley

  • Devotee
  • *
  • Posts: 1055
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: can't start simutrans with pak128 on linux -help
« Reply #17 on: August 04, 2011, 01:28:04 PM »
With Fedora 15, this solved the problem:

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

Offline TungstenX

  • *
  • Posts: 12
  • Languages: AF, EN
Re: can't start simutrans with pak128 on linux -help
« Reply #18 on: December 01, 2015, 07:37:55 PM »
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.

Offline Vladki

  • Devotee
  • *
  • Posts: 3711
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: can't start simutrans with pak128 on linux -help
« Reply #19 on: December 01, 2015, 07:54:05 PM »
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.

Offline TungstenX

  • *
  • Posts: 12
  • Languages: AF, EN
[SOLVED] Re: can't start simutrans with pak128 on linux -help
« Reply #20 on: December 30, 2015, 08:57:14 AM »
Thank you Vladki for pointing me in the right direction.

Before the fix, I got this (2 not found libraries):
Code: [Select]
$ 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:

Code: [Select]
sudo apt-get install bzip2:i386
sudo apt-get install libsdl1.2debian:i386