Wiki copymirror

This is a mirror of the wiki at pascal.chat. Editing, history and sign-in are there.

Install on Ubuntu from .deb files

Deutsch ยท English

(Ubuntu only)

Please See Installing Lazarus on Linux - a page that covers most of what you need for most Linux Distributions.

This page is substantially out of date and may be removed.

In General

Why install from .debs?

The easiest way to install Lazarus on Ubuntu is via the software Centre or Synaptic. However if that is unsuccessful or the version of Lazarus in the repository is too old and you want a newer version then you can 'install from debs'.

.deb files

.deb files are the ideal files for installing on Ubuntu. You need to download the Lazarus .deb files you want. They will usually be on SourceForge. There will be a Lazarus .deb and a Free Pascal .deb. They will match each other.

In Particular: Lazarus 0.9.30 on Ubuntu 10.04

Get The files

https://sourceforge.net/projects/lazarus/files/

Repository

The versions in the Ubuntu repository are

These are too old.

SourceForge

The versions on SourceForge are

These are what I want.

Find SourceForge .deb files

The names of the .deb files I need to download are

You can search for these directly in a Search engine with something like

text
Lazarus 0.9.30 .deb SourceForge

Download and Extract

Download these two files. Double click on them and accept the offer to extract.

Inside the folders

Once done, there are 21 .deb files in folder a and 12 .deb files in folder b. Two common mistakes when installing Lazarus are

However, notice that Free Pascal source code is one of the files in folder a. Therefore, this will NOT need to be downloaded and installed separately.

Install Free Pascal

This should be done first.

Open a terminal.

bash
cd Desktop
cd a
dpkg -i *.deb

This last command will install Free Pascal and Free Pascal source code.

Errors

Ideally, everything would run smoothly and the installation would complete without error. However when I did it, there were a number of errors. These errors are sometimes 'show-stoppers' so they should be sorted out if possible. The most common error is a missing dependency, as happened to me.

Missing Dependencies

This means that a package that Lazarus expects to be installed on your system already is not there. The missing packages were:

Install missing dependencies

Open Synaptic. Search for each of the missing packages and install them.

a52cat

This package is not in the Ubuntu 10.04 repository. We have to leave it and hope for the best.

Reinstall Free Pascal

Repeat the previous installation procedure with: Open a terminal.

bash
cd Desktop
cd a
dpkg -i *.deb

Free Pascal will now install fairly smoothly.

fp-units-multimedia

Only the multimedia unit will not install. This is due to the missing a52cat package. However it may not be critical.

Check the installation

You can check the Free Pascal installation in three ways:

Open a terminal

text
fpc

it should open in the terminal.

You can see where the files are stored with

bash
sudo dpkg -L fpc

Install Lazarus

This is similar to Free Pascal

Open a terminal.

bash
cd Desktop
cd b
dpkg -i *.deb

and the installation will proceed.

Errors

An error occurs installing package lcl-qt4-0.9.30.

lcl-qt4-0.9.30

From the terminal output you can see that the unit can not be installed due to a dependency on ... However, if you read the information that appears in Synaptic for this package then it says

"Actually this is an empty package but ..."

I think we can safely ignore it.

Test

Open Lazarus and try to create a simple 'Hello World' application with a button click. It worked with mine and the installation is complete.

Check with Synaptic

You can check that Lazarus has been installed with Synaptic

Fix Broken packages

Unfortunately, I now have 2 broken packages on my Ubuntu system, fp-multimedia and lcl-qt4. I choose 'Edit/Fix broken Packages and the fp-multimedia unit goes green but the lcl-qt4 package goes bright red - not normally a good sign. However if you select

text
Apply

then Ubuntu will fix the multimedia package and remove the qt4 package. Everything is then in order.

Final test

Create a Hello World application with a button and a label. If this works then things are looking good. Lazarus is installed.

See also


From the Free Pascal wiki, page "Install on Ubuntu from .deb files", as it stood on 2022-06-05 after a change by Malcome, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 2, last changed by WikiArchive .