Difference between revisions of "Install on Ubuntu 11.10"

From Lazarus wiki
Jump to navigationJump to search
Line 27: Line 27:
 
*Remove the taskbar
 
*Remove the taskbar
 
Open a terminal and try
 
Open a terminal and try
  sudo
+
  sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt
 
Give your password
 
Give your password
 
These can be re-installed if needed with
 
These can be re-installed if needed with
 
+
sudo apt-get install appmenu-gtk3 appmenu-gtk appmenu-qt
 
*Remove the Ubuntu overlay scrollbars
 
*Remove the Ubuntu overlay scrollbars
Open synaptioc
+
Open synaptic and search for liboverlay-scrollbar
Search for  
+
Uninstall the 2 packages
Uninstall the packages
+
These can be re-installed if needed with synaptic
 
 
These can be re-installed if needed with
 
  
 
'''The 'blank form' project should now run with no errors.'''
 
'''The 'blank form' project should now run with no errors.'''

Revision as of 19:16, 22 February 2012

In General

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)

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 it is called Lazarus 0.9.30-2Build1.

Find and install the packages

In the Software Centre search for

  • IDE for FreePascal (SDK metapackage)
  • Free Pascal Compiler fpc
  • Free Pascal source code

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 a 'blank form' project (having first saved it) you will get this error message:

Solution (10 mins): Remove the Ubuntu taskbar menu and 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

sudo apt-get install appmenu-gtk3 appmenu-gtk appmenu-qt
  • Remove the Ubuntu overlay scrollbars

Open synaptic and search for liboverlay-scrollbar Uninstall the 2 packages These can be re-installed if needed with synaptic

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

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

Can't find class Classes

or

Can't find class Sysutils

Solution (10 mins): Reconfigure Lazarus as sudo

This can only be solved if you open Lazarus as sudo.

  • Scan the Pascal source code

Open a terminal and start Lazarus as sudo with

gksudo StartLazarus

Give your sudo password

In Lazarus choose Environment/Rescan FPC source directory

  • Rebuild Lazarus.

Open a terminal

gksudo StartLazarus

Give your sudo password

In Lazarus choose Tools/BuildLazarus with profile:Build all

Ubuntu 10.04 LTS (Lucid Lynx)

The version in this repostiory is Lazarus 0.9.28.2 which is quite old.