Difference between revisions of "Install on Ubuntu 11.10"

From Lazarus wiki
Jump to navigationJump to search
(Point user to standard Linux Lazarus Install Page, this one is out of date.)
 
(41 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{Platform only|Ubuntu|Ubuntu|Ubuntu}}
 
==In General==
 
==In General==
 +
 +
'''See [[Installing Lazarus on Linux]] - this page covers most of what you need for most Linux Distributions.'''
 +
 +
Warning, this page is very out of date and should be removed.
 +
 +
 
===Overview===
 
===Overview===
 
To install Lazarus you install three things:  
 
To install Lazarus you install three things:  
Line 10: Line 17:
  
 
==Ubuntu 11.10 (Oneiric Ocelot)==
 
==Ubuntu 11.10 (Oneiric Ocelot)==
 +
===What you want===
 
Matching versions of Lazarus and Free Pascal are in the repository (20/02/12). They are  
 
Matching versions of Lazarus and Free Pascal are in the repository (20/02/12). They are  
 
*Lazarus 0.9.30-2.
 
*Lazarus 0.9.30-2.
 
*Free Pascal 2.4.4
 
*Free Pascal 2.4.4
In Synaptic it is called Lazarus 0.9.30-2Build1.
+
In Synaptic they are called Lazarus 0.9.30-2Build1, fpc, and fp.
 +
 
 
===Find and install the packages===
 
===Find and install the packages===
In the Software Centre search for
+
In the Software Centre search for and install:
*IDE for FreePascal (SDK metapackage)
+
*IDE for FreePascal - SDK metapackage - search under lazarus
*Free Pascal Compiler fpc
+
*Free Pascal - SDK metapackage - search under fpc
*Free Pascal source code
+
*FreePascal - SDK source code metapackage- search under fpc
 
With Synaptic, install everything beginning with Laz, fpc or fp.
 
With Synaptic, install everything beginning with Laz, fpc or fp.
  
 
===Problem 1===
 
===Problem 1===
Once you have installed Lazarus, it will not work. Even if you add no code at all and compile and run a 'blank form'  project (having first saved it) you will get this error message:
+
Once you have installed Lazarus, it will not work. Even if you add no code at all and compile and run everyone's favourite 'Blank form'  project (having first saved it of course) you will get this error message:
 
  Project project1 raised Exception class EInterface critical with message: ....
 
  Project project1 raised Exception class EInterface critical with message: ....
  
===Solution (10 mins): Remove the Ubuntu taskbar menu and scrollbars===
+
===Solution (10 mins): Remove the Ubuntu taskbar menu and overlay scrollbars===
 
*Remove the taskbar
 
*Remove the taskbar
 
Open a terminal and try
 
Open a terminal and try
 
  sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt
 
  sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt
 
Give your password
 
Give your password
These can be re-installed if needed with the same command but put 'install' in place of'remove'.
+
These can be re-installed if needed with the same command but put 'install' in place of 'remove'.
 
*Remove the Ubuntu overlay scrollbars
 
*Remove the Ubuntu overlay scrollbars
Open synaptic and search for liboverlay-scrollbar
+
Open synaptic and search for 'liboverlay-scrollbar'.
Uninstall the 2 packages
+
 
These can be re-installed if needed with synaptic
+
Uninstall the 2 packages highlighted. They can be re-installed if needed with Synaptic
 +
 
 +
''You now need to restart Ubuntu and hope.''
  
 
'''The 'blank form' project should now run with no errors.'''
 
'''The 'blank form' project should now run with no errors.'''
  
 
===Problem 2===
 
===Problem 2===
If you add a button to your 'blank form' project. In the ''Events'' tab of the'' Object Inspector'' , try to open the 'Click' event handler. You will get the error message  
+
Add a button to your 'blank form' project. In the ''Events'' tab of the'' Object Inspector'' , try to open the 'Click' event handler. You will get the error message  
  Can't find class Classes
+
  unit not found: Classes
 
or
 
or
  Can't find class Sysutils
+
  unit not found: Sysutils
  
 
===Solution (10 mins): Reconfigure Lazarus as sudo===
 
===Solution (10 mins): Reconfigure Lazarus as sudo===
This can only be solved if you open Lazarus as sudo.
+
This can be solved as follows:
*Scan the Pascal source code
+
*Open Lazarus as sudo
 
Open a terminal and start Lazarus as sudo with
 
Open a terminal and start Lazarus as sudo with
 
  gksudo StartLazarus
 
  gksudo StartLazarus
 
Give your sudo password
 
Give your sudo password
 +
*Rescan the Pascal source directory
 +
'''In Lazarus''' choose
 +
'' Tools -> Rescan FPC source directory''
 +
*Rebuild Lazarus
 +
'''In Lazarus''' choose
 +
''Tools -> BuildLazarus with profile:Build all''
  
'''In Lazarus''' choose '' Environment/Rescan FPC source directory''
+
*Close Lazarus.
*Rebuild Lazarus.
+
 
Open a terminal
+
''You should now be able to open Lazarus normally and create a project with a button that is clickable!'''
gksudo StartLazarus
+
 
Give your sudo password
+
'Hello World' here we come.
  
'''In Lazarus''' choose ''Tools/BuildLazarus with profile:Build all''
+
''Oh Joy!''
  
 
===Lazarus Forum===
 
===Lazarus Forum===
 
There are several threads that are useful
 
There are several threads that are useful
[http://www.lazarus.freepascal.org/index.php/topic,16062.0.html]Forgetting to install Free Pascal source code
+
 
 +
[http://www.lazarus.freepascal.org/index.php/topic,16062.0.html Forgetting to install Free Pascal source code]
 +
 
 
[http://www.lazarus.freepascal.org/index.php/topic,14982.0.html Solving problem 1]
 
[http://www.lazarus.freepascal.org/index.php/topic,14982.0.html Solving problem 1]
 +
 +
[http://www.lazarus.freepascal.org/index.php/topic,14672.0.html Solving problem 2]
 +
 +
[http://www.lazarus.freepascal.org/index.php/topic,15005.0.html More about problem 2]
 +
 +
[http://www.lazarus.freepascal.org/index.php/topic,14672.0.html Installing using debs]
 +
 +
===Video===
 +
It's in German. It is very clear. In this case, after the installation, Lazarus ran without problem - mine didn't.
 +
 +
[http://www.youtube.com/watch?v=fgnzdegIB40 You tube showing install]
 +
 +
===Problem 2 image===
 +
 +
[[image:LazarusErrorSmall.jpg]]
  
 
==Ubuntu 10.04 LTS (Lucid Lynx)==
 
==Ubuntu 10.04 LTS (Lucid Lynx)==
The version in this repostiory is Lazarus 0.9.28.2 which is quite old. It installs via synaptic and it then works.
+
The version in this repository is Lazarus 0.9.28.2 which is quite old. It installs via synaptic and it then works.  
 +
 
 +
===Install from .deb files===
 +
If you want to install a newer version using .deb files then see the wiki page
 +
 
 +
[[Install on Ubuntu from .deb files | How to install from .deb files]]
 +
 
 +
==See also==
 +
 
 +
* [[Install on Ubuntu from .deb files]]
 +
 
 +
[[Category:Ubuntu]]
 +
[[Category:Install]]

Latest revision as of 03:21, 17 January 2021

Logo-ubuntu cof-orange-hex.svg

This article applies to Ubuntu only.

See also: Multiplatform Programming Guide

In General

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

Warning, this page is very out of date and should be removed.


Overview

To install Lazarus you install three things:

  • fpc - the Free Pascal compiler
  • fpc-src - the source code for Free Pascal
  • Lazarus -the IDE for Free Pascal

Versions

You must install the correct version of Free Pascal for the version of Lazarus you choose. The versions below are correct.

Ubuntu 11.10 (Oneiric Ocelot)

What you want

Matching versions of Lazarus and Free Pascal are in the repository (20/02/12). They are

  • Lazarus 0.9.30-2.
  • Free Pascal 2.4.4

In Synaptic they are called Lazarus 0.9.30-2Build1, fpc, and fp.

Find and install the packages

In the Software Centre search for and install:

  • IDE for FreePascal - SDK metapackage - search under lazarus
  • Free Pascal - SDK metapackage - search under fpc
  • FreePascal - SDK source code metapackage- search under fpc

With Synaptic, install everything beginning with Laz, fpc or fp.

Problem 1

Once you have installed Lazarus, it will not work. Even if you add no code at all and compile and run everyone's favourite 'Blank form' project (having first saved it of course) you will get this error message:

Project project1 raised Exception class EInterface critical with message: ....

Solution (10 mins): Remove the Ubuntu taskbar menu and overlay scrollbars

  • Remove the taskbar

Open a terminal and try

sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt

Give your password These can be re-installed if needed with the same command but put 'install' in place of 'remove'.

  • Remove the Ubuntu overlay scrollbars

Open synaptic and search for 'liboverlay-scrollbar'.

Uninstall the 2 packages highlighted. They can be re-installed if needed with Synaptic

You now need to restart Ubuntu and hope.

The 'blank form' project should now run with no errors.

Problem 2

Add a button to your 'blank form' project. In the Events tab of the Object Inspector , try to open the 'Click' event handler. You will get the error message

unit not found: Classes

or

unit not found: Sysutils

Solution (10 mins): Reconfigure Lazarus as sudo

This can be solved as follows:

  • Open Lazarus as sudo

Open a terminal and start Lazarus as sudo with

gksudo StartLazarus

Give your sudo password

  • Rescan the Pascal source directory

In Lazarus choose

 Tools -> Rescan FPC source directory
  • Rebuild Lazarus

In Lazarus choose

Tools -> BuildLazarus with profile:Build all
  • Close Lazarus.

You should now be able to open Lazarus normally and create a project with a button that is clickable!'

'Hello World' here we come.

Oh Joy!

Lazarus Forum

There are several threads that are useful

Forgetting to install Free Pascal source code

Solving problem 1

Solving problem 2

More about problem 2

Installing using debs

Video

It's in German. It is very clear. In this case, after the installation, Lazarus ran without problem - mine didn't.

You tube showing install

Problem 2 image

LazarusErrorSmall.jpg

Ubuntu 10.04 LTS (Lucid Lynx)

The version in this repository is Lazarus 0.9.28.2 which is quite old. It installs via synaptic and it then works.

Install from .deb files

If you want to install a newer version using .deb files then see the wiki page

How to install from .deb files

See also