Mike MacDonagh's Blog

Somewhere in the overlap between software development, process improvement and psychology

I finally managed to install lazarus 0.9.30 and fpc 2.4.2 on Ubuntu

[Update: this post was from May 2011 for Ubuntu 10, for Ubuntu 11 see here]

I tried updating apt sources with “deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe” but got an error:

Failed to fetch http://www.hu.freepascal.org/lazarus/dists/lazarus-stable/Release  Unable to find expected entry ‘universe/source/Sources’ in Release file (Wrong sources.list entry or malformed file)

I tried checking out the daily source from SVN but couldn’t work out how to make it all build properly. I tried the daily downloads of deb packages but got an error on starting that said “LCLBase 1.0” – “Unit not found: RegisterLCL” error.

I tried downloading various archives full of stuff and either making, installing debs or whatever with a variety of problems. Often there were broken package dependencies around e(.g. “package lcl-units-0.9.30 is not installed”).

Finally I found a way that worked over the weekend so I thought I’d share it for others having these difficulties. First if you’ve got a corrupt/broken installation or an old version installed it’s a good idea to get rid of it. I did this by doing:

1. Delete any existing FPC and Lazarus stuff, conflicts between versions are the source of many of the problems!

sudo apt-get purge fpc lazarus*
sudo rm -Rf /usr/lib/fpc
sudo rm -Rf /usr/lib/lazarus
sudo rm -Rf /usr/share/fpcsrc
sudo rm -f ~/.fpc
sudo rm -Rf ~/.lazarus

2.  Download and extract the fpc packages (although at time of writing the ones packaged with ubuntu 11.10 are good enough – 22/10/11) and the latest lazarus packages. This ends up with two folders full or .deb files. Going into the fpc one first, then the lazarus one and entering:

sudo dpkg -i *

Installs FPC and then Lazarus.

3. Finally run Lazarus from your main menu, weird unity thingy or whatever you use 😀


4 responses to “I finally managed to install lazarus 0.9.30 and fpc 2.4.2 on Ubuntu

  1. Francesco July 23, 2011 at 11:17 am

    Yeah, that worked 🙂
    This saved me a great deal of time, thanks!

    (fpc packages link seems to be wrong, plus obviously pay attention if you need a 32 or 64 bit package)



  2. Pingback: Install single window Lazarus 0.9.30 in Ubuntu 11.10 step by step « The Mac Daddy

  3. Pingback: Linux GUI Development: Lazarus 0.9.30 review and screenshots « The Mac Daddy

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: