Monday, May 16, 2011

I finally managed to install lazarus 0.9.30 and fpc 2.4.2 on Ubuntu « The Mac Daddy

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 and the 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 :D

No comments:

Post a Comment