The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: Isaac Eiland-Hall on May 05, 2015, 10:24:45 PM

Title: How to run 32 bit simutrans on a 64 bit Ubuntu/Debian/... Linux
Post by: Isaac Eiland-Hall on May 05, 2015, 10:24:45 PM
This is my first 64bit system, and I'm not a Linux guru. Yet. :)

Downloaded nightly and a pak. Running simutrans from terminal:

Quote./simutrans: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory

I do have libbz2-1.0 installed.

Some googling indicates that this can happen when trying to run a 32bit binary in 64bit Ubuntu.

I notice I can download a 64bit engine from simutrans.com; but no such option on the nightly site. Does that match what is known? So I can't run nightlies? Or anyone have any ideas? :)
Title: Re: 64bit Ubuntu MATE 15.04 + nightly: libbz2.so.1.0: cannot open shared object file
Post by: isidoro on May 05, 2015, 11:12:57 PM
Hi, and welcome on board!

You can run 32-bit applications and 64-bit applications in a 64-bit system, but 32-bit applications won't work in a 64-bit linux out of the box, generally.

So, first locate the simutrans executable file and find out whether it is a 32-bit or 64-bit application.  You can know that running "file <name_of_the_file_you_want_to_know_about>".   If it is 64, it will say: "ELF 64-bit...".

If it is 32, you have to:
You can see the version of a library that is installed by: dpkg -l libbz2-1.0
In my case, I have the 64-bit version:
ii  libbz2-1.0:amd64 1.0.6-7       amd64         high-quality block-sorting file compre, since it says amd64.

In my case, if I want to run the 32-bit executable of ST, I would have to install the 32-bit version of the library to match the executable.

Hope it helps.
Title: Re: How to run 32 bit simutrans on a 64 bit Ubuntu/Debian/... Linux
Post by: zyphlar on May 30, 2016, 03:57:47 AM
This is the command I ran in Ubuntu 14.04 x64 to get things working:

sudo apt-get install libbz2-1.0:i386 libsdl1.2debian:i386
Title: Re: How to run 32 bit simutrans on a 64 bit Ubuntu/Debian/... Linux
Post by: railh on April 26, 2017, 05:22:33 PM
Compile Simutrans Extended on Ubuntu 17.04:


sudo apt-get build-dep simutrans


Get simutrans extended:
git clone https://github.com/jamespetts/simutrans-extended.git

Look for a file called "config.template", then rename it "config.default". Open config.default. Remove the # symbols in front of the following options:

BACKEND = sdl
COLOR_DEPTH = 16
OS_TYPE = linux
OPTIMISE = 1


Go into the simutrans-extended folder and compile it:
cd simutrans-extended
make

Copy the file /build/default/simutrans-extend into the simutrans folder:
cp build/default/simutrans-extended simutrans/

Add a pakset into the simutrans folder (http://bridgewater-brunel.me.uk/downloads/nightly/pakset/). Go into the simutrans folder and start the game:
cd simutrans
./simutrans-extended
Title: Re: How to run 32 bit simutrans on a 64 bit Ubuntu/Debian/... Linux
Post by: samuelddarden on August 04, 2020, 06:04:26 AM
Thanks for the code
Title: Re: How to run 32 bit simutrans on a 64 bit Ubuntu/Debian/... Linux
Post by: prissi on August 07, 2020, 01:55:38 PM
There is a nightly in 64 bit, but you need to download it from github:
https://github.com/aburch/simutrans/releases