Difference between revisions of "Lazarus release version for Ubuntu"

From Lazarus wiki
Jump to navigationJump to search
m (Categories install, lazarus)
(Removed dodi's version: outdated, GUI methods covered in long install instructions anyway)
Line 5: Line 5:
 
== Short version: get Lazarus ==
 
== Short version: get Lazarus ==
  
In the sections that follow, there's a complete list of the commands you need to type at the console to download and install Lazarus on an Ubuntu system. If you're impatient, this section will just give you what you need to get it installed without going through every part of the process line by line.
+
In the sections that follow, there's a complete list of the commands you need to type at the console (or alternatives using the GUI) to download and install Lazarus on an Ubuntu system. If you're impatient, this section will just give you what you need to get it installed without going through every part of the process line by line.
  
 
Select and copy the following script, and save it as a file in your home directory named '''getlaz''':
 
Select and copy the following script, and save it as a file in your home directory named '''getlaz''':
Line 28: Line 28:
 
The process will download around 100Mb of data from the Lazarus repository and the standard ones.  It will take at least five minutes, even with a fast connection.  Any time it stops to ask for confirmation of any step, answer "Y" for yes.
 
The process will download around 100Mb of data from the Lazarus repository and the standard ones.  It will take at least five minutes, even with a fast connection.  Any time it stops to ask for confirmation of any step, answer "Y" for yes.
  
When it finishes and returns to the shell prompt, you're set. Look in the "Development" section of your Ubuntu menu; Lazarus will be there and functional.
+
When it finishes and returns to the shell prompt, you're set. Look in the "Development" section of your Ubuntu menu; Lazarus will be there and functional.
  
 
== Long version: step by step ==
 
== Long version: step by step ==
Line 46: Line 46:
 
=== Add the repository ===
 
=== Add the repository ===
  
You can use synaptic for this or edit the /etc/apt/sources.list directly. For the stable repository, add the line:
+
You can use synaptic/software package manager for this or edit the /etc/apt/sources.list directly. For the stable repository, add the line:
 
<syntaxhighlight lang="bash">deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe</syntaxhighlight>
 
<syntaxhighlight lang="bash">deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe</syntaxhighlight>
Or using a console app. do:
+
Or using a console do:
 
<syntaxhighlight lang="bash">echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe">/etc/apt/sources.list.d/lazarus.list</nowiki></syntaxhighlight>
 
<syntaxhighlight lang="bash">echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe">/etc/apt/sources.list.d/lazarus.list</nowiki></syntaxhighlight>
 +
 
For the testing repository:
 
For the testing repository:
 
<syntaxhighlight lang="bash">deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe</syntaxhighlight>
 
<syntaxhighlight lang="bash">deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe</syntaxhighlight>
Or similarly, using a console app. do:
+
Or similarly, using a console do:
 
<syntaxhighlight lang="bash">echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe">/etc/apt/sources.list.d/lazarus.list</syntaxhighlight>
 
<syntaxhighlight lang="bash">echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe">/etc/apt/sources.list.d/lazarus.list</syntaxhighlight>
 
Note that trying the echo command you may get "bash: /etc/apt/sources.list.d/lazarus.list: Access denied" and the same with sources.list, even with sudo. Fortunately manually editing the file also works in this case.
 
Note that trying the echo command you may get "bash: /etc/apt/sources.list.d/lazarus.list: Access denied" and the same with sources.list, even with sudo. Fortunately manually editing the file also works in this case.
Line 58: Line 59:
 
=== An alternative repository ===
 
=== An alternative repository ===
  
If you find this version not completely "Ubuntu-ish", that is, that do not completely fits onto the Ubuntu Linux way of installing the program and the associated fpc libraries and lazarus sources, you can try this alternative Ubuntu repository:
+
If you find this version not completely "Ubuntu-ish", that is, it doesn't completely fit with the Ubuntu Linux way of installing the program and the associated FPC libraries and Lazarus sources, you can try this alternative Ubuntu repository:
  
 
https://launchpad.net/~paul-climbing/+archive/ppa
 
https://launchpad.net/~paul-climbing/+archive/ppa
Line 64: Line 65:
 
=== Install Lazarus ===
 
=== Install Lazarus ===
  
Now You can install Lazarus with apt:
+
Now you can install Lazarus with apt:
 
<syntaxhighlight lang="bash">sudo apt-get update; apt-get install lazarus</syntaxhighlight>
 
<syntaxhighlight lang="bash">sudo apt-get update; apt-get install lazarus</syntaxhighlight>
  
== DoDi's version - including update to newer versions ==
+
Of course you can use a graphical software manager like Synaptic as well.
 
 
This is for Lazarus 0.9.28/29 on Ubuntu 9.10, may work similarly with other systems based on *.deb packages. Both Lazarus and the required FPC are provided by the above repository, which must be added to the software sources first:
 
 
 
Open Software Management (KPackageKit), Settings (bottom entry), Edit Software Sources, Other Software. Add
 
<syntaxhighlight lang="bash">deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe</syntaxhighlight>
 
Close and let perform an update.
 
 
 
Now to Software Management (top entry), find "lazarus" (without the quotes), select all 0.9.28 packages and Apply. If there are too many entries, the commandline may be easier to use:
 
<syntaxhighlight lang="bash">sudo apt-get install lazarus</syntaxhighlight>
 
This should install both fpc (2.2) and lazarus (0.9.28).
 
 
 
Newer Lazarus versions require fpc 2.4 at least. I downloaded fpc-2.4.0-0.i386.deb.tar and unpacked it into a new directory. Then again from the commandline, cd into the directory and enter:
 
<syntaxhighlight lang="bash">sudo dpkg -i *.deb</syntaxhighlight>
 
Now you should be ready for getting the Lazarus sources from the SVN.
 
  
 
= Hints for specific Ubuntu versions =
 
= Hints for specific Ubuntu versions =

Revision as of 09:50, 20 September 2012

Getting Lazarus from our Ubuntu repository

On www.hu.freepascal.org there is a Ubuntu repository with Lazarus and FPC debs.

Short version: get Lazarus

In the sections that follow, there's a complete list of the commands you need to type at the console (or alternatives using the GUI) to download and install Lazarus on an Ubuntu system. If you're impatient, this section will just give you what you need to get it installed without going through every part of the process line by line.

Select and copy the following script, and save it as a file in your home directory named getlaz:

#!/bin/sh
gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F
gpg --export 6A11800F | sudo apt-key add -
echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" > lazarus.list
sudo mv -v lazarus.list  /etc/apt/sources.list.d/lazarus.list
sudo apt-get update
sudo apt-get install lazarus

At the shell prompt, type this to prepare the script for execution, and to execute it (you can copy these lines and paste them into your shell using Shift+Insert):

chmod +x getlaz
./getlaz

The process will download around 100Mb of data from the Lazarus repository and the standard ones. It will take at least five minutes, even with a fast connection. Any time it stops to ask for confirmation of any step, answer "Y" for yes.

When it finishes and returns to the shell prompt, you're set. Look in the "Development" section of your Ubuntu menu; Lazarus will be there and functional.

Long version: step by step

Now, for completists, here's the same instruction step by step. You can ignore it if you followed the above instructions successfully. Please remember to come back to the wiki and put in any tested, reliable changes that might clarify this section!

Add the key

Download the key from the public key server:

gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F

Add it to the apt system:

gpg -a --export 6A11800F | sudo apt-key add -

You can see the list of apt keys with:

sudo apt-key list

Add the repository

You can use synaptic/software package manager for this or edit the /etc/apt/sources.list directly. For the stable repository, add the line:

deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe

Or using a console do:

echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe">/etc/apt/sources.list.d/lazarus.list</nowiki>

For the testing repository:

deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe

Or similarly, using a console do:

echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe">/etc/apt/sources.list.d/lazarus.list

Note that trying the echo command you may get "bash: /etc/apt/sources.list.d/lazarus.list: Access denied" and the same with sources.list, even with sudo. Fortunately manually editing the file also works in this case.

An alternative repository

If you find this version not completely "Ubuntu-ish", that is, it doesn't completely fit with the Ubuntu Linux way of installing the program and the associated FPC libraries and Lazarus sources, you can try this alternative Ubuntu repository:

https://launchpad.net/~paul-climbing/+archive/ppa

Install Lazarus

Now you can install Lazarus with apt:

sudo apt-get update; apt-get install lazarus

Of course you can use a graphical software manager like Synaptic as well.

Hints for specific Ubuntu versions

Unity

Unity shows the menu bar like OS X on the top bar. You can change this for individual programs. Start lazarus with the command

UBUNTU_MENUPROXY= ./lazarus

or, from a batch file

export UBUNTU_MENUPROXY=
./lazarus