Over the last months several people have posted messages describing the difficulties they experienced upon trying to install Lazarus/FPC on Ubuntu. Below are the steps to follow to successfully install from .deb packages. If you choose to install from source then you are on you own and I assume that you know
exactly what you are doing, therefore you don't need my instructions; keep in mind though that you will need to apply all updates from source, and possibly also some dependency upgrades which may or may not break the consistency of your Ubuntu (.deb) package tree.
Warning: Recent .deb packages may have been built for recent Ubuntu releases and may require dependencies that are only available for those Ubuntu releases.
To install the Lazarus/FPC .deb packages:
1. Install Ubuntu. Notice that Canonical recommend the 32-bit release (hint!).
2. Apply all Ubuntu software updates.
3. Install the lazarus meta-package (a meta-package only contains a list of packages that "work together"). It is very important that you do
not skip this step as it will install all the required dependencies (tons of them). In Ubuntu 11.* you can use whatever .deb package manager you want but I recommend Synaptic (if it's not already installed then open a Terminal window and run:
sudo apt-get install synaptic).
4. Launch Lazarus from the Applications menu and verify that it runs as expected. Open the environment preferences and customize it as you like. It is a good idea to choose a temporary folder located in you home folder, rather than the default /tmp folder.
5. If you are unhappy with the installed version and want to upgrade to the latest
stable packages then visit the SF archive (e.g.,
http://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20i386%20DEB/Lazarus%200.9.30.2/) and download the .deb.tar files to your Downloads folder and untar them; move all .deb files to one folder. You may wish to delete/move to another folder any Qt-related .deb files (you can install them later if necessary), particularly if the Qt framework is not installed on your Ubuntu machine. Uninstall all lazarus*, fpc*, and fp-* packages (but not the dependencies) using Synaptic. Then open a Terminal window in the folder where the .deb files are and issue:
sudo dpkg -i *.deb (assuming there are no other .deb files in that folder). This will upgrade your Lazarus/FPC packages, including the link in the Ubuntu Applications menu.
Note: Do not install a daily snapshot unless you know that a specific bug that is preventing your Lazarus/FPC application from running as expected has been fixed in the daily snapshot.
6. Launch Lazarus from the Applications menu and verify that it runs as expected. If it does not and you want to revert to the previous version then you need to (a) uninstall all lazarus*, fpc*, and fp-* packages (but not the dependencies) using Synaptic; and (b) go to step 3. Before you uninstall you may wish to try deleting the
.lazarus folder in your home folder (you need to enable View Hidden Files in the file manager Preferences to see it) then launch Lazarus again and see if the problem persists.
If you want to install/remove Lazarus component packages (.lpk; not the same as Ubuntu .deb packages!) then you must launch Lazarus as superuser; in a Terminal window issue:
sudo start-lazarus. You do not need to (and
should not) change any file permissions in /usr or elsewhere to install Lazarus packages.
If at some point you do want to install from source I recommend that you first uninstall any installed Lazarus/FPC .deb packages (see step 6 above).
Like other Gnome/Gtk+ applications, the current Lazarus/FPC release does not integrate very well with the Unity interface in Ubuntu 11.*. There are workarounds posted to this forum that address these issues. However, I think Unity is still work in progress, it targets mainly tablet users, and good integration with future Ubuntu releases will require efforts from both Canonical and Lazarus developers. On the other hand, Lazarus/FPC is remarkably fast and stable on Ubuntu 10.04 LTS and 10.10. It also runs great on the latest RHEL-based distros such as Linux Scientific 6.1. All of these are very stable releases.
Cheers!