lazarus (free pascal delphi like ide) on ubuntu (amd64)

Download x86-64 (or i386) free pascal binary package from

tar -xvf fpc-2.0.0.x86_64-linux.tar

sudo sh

I have installed it in /opt/fpc and answered Yes/[ENTER] to all questions
If all ok then you can get compiler version this way

/opt/fpc/bin/fpc -i

Free Pascal Compiler version 2.0.0

Compiler Date : 2005/05/15
Compiler CPU Target: x86_64

Supported targets:
Linux for x86-64
FreeBSD for x86-64

Supported CPU instruction sets:

Supported FPU instruction sets:

add /opt/fpt/bin in $PATH

vi ~/.bash_profile


if [ -d /opt/fpc/bin ] ; then

You need to install the development packages of the GTK and pixbuf libraries, so
sudo apt-get install libgtk2.0-dev
sudo apt-get install libgdk-pixbuf-dev

cd opt
Download lazarus package

tar -zxvf lazarus-0.9.10-0.tar.gz

cd lazarus



It should look like this

sudo apt-get install libgpmg1-dev (needed by fpc console ide) Next download Free Pascal Compiler Source (2.0.2) from
tar -zxvf fpc-2.0.2.source.tar.gz
cd fpc
vi Makefile
and replace this line
INSTALL_PREFIX=/usr/local with

make build
make install

Share this page:

Suggested articles

4 Comment(s)

Add comment


By: Anonymous

A normal size screenshot whould have been nice.... I couldn't even find any screenshot on the page :(

By: Anonymous

I followed your instructions on my Breezy X86_64 Ubuntu install and it all worked great until I tried to build the source using: make build

It fails with this error:

/opt/fpc/bin/ppcx64 -Ur -Ur -Xs -n -Fi../inc -Fi../x86_64 -Fi../unix -Fix86_64 -FE. -FU/opt/fpc/rtl/units/x86_64-linux -dx86_64 -dRELEASE ../unix/cthreads.pp
cthreads.pp(600,30) Error: Incompatible types: got "<address of function(Pointer, QWord, TThreadFunc, Pointer, LongWord,var LongInt):LongInt;Register>" expected "<procedure variable type of function(Pointer, LongWord, TThreadFunc, Pointer, LongWord,var Lo
cthreads.pp(646) Fatal: There were 1 errors compiling module, stopping
cthreads.pp(646) Error: Compilation aborted


a google search leads to this bug posting:

I am unable to get past this problem at this time but thanks for the info on the rest!

By: mariuz
By: Anonymous

Very nice. Complete, clear and extact. Thanks a lot, this got be running in no time.

I installing on suse 9.2 with apt4suse

I just had to adjust the package names to the suse equiv. like gdk-pixbuf-devel . Using apt search if needed.

The only thing that really needs changing is in editing the Makefile.

Ubuntu/debs identifies itself $OSTYPE=darwin so the test fails and laz compiles as for win32 platform.

My suse and gentoo systems identify as linux

Once I'd spotted that it worked beautifully.

Thanks again for posting a thorough guide.