Recent

Author Topic: How to install the last version of Lazarus in Xubuntu?  (Read 18493 times)

Hydexon

  • Full Member
  • ***
  • Posts: 170
How to install the last version of Lazarus in Xubuntu?
« on: June 09, 2011, 05:17:39 am »
Hello... i want know how find a way to install the lastest version (0.9.30) of lazarus under Xubuntu because in the Ubuntu Application Center only appears the 0.9.28?
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

jl

  • Full Member
  • ***
  • Posts: 178
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #1 on: June 09, 2011, 06:08:28 am »
I'm a Linux newbie, this is what I did, I don't know if it is the correct way but it seemed to worked.

1. Install a fresh version of debian/Ubuntu - no lazarus or fpc previously installed.  If you're using VM, this is easy.  Also backup the original in case the installation screws up.

2. Download all the lazarus-0.9.30 and fpc-2.4.2 .deb from sourceforge.  All must be downloaded.

3. Run terminal, issue command 'sudo apt-get install -f'

4. Issue command 'sudo dpkg -i .deb for fpc folder first followed by lazarus folder.  Then copy missing lazdaemon.lpk to /usr/lib/lazarus/0.9.30/components/daemon/

5. Now the problem is that if I need to recompile Lazarus, I need to launch it from root terminal - '/usr/lib/lazarus/0.9.30/startlazarus' or 'sudo /usr/lib/lazarus/0.9.30/startlazarus'.  For some reason, the Laz installed has no root rights, unlike if installed from Synaptic Package Manager.

Next to find out is how to upgrade FPC on this installation, if you know, let me know.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #2 on: June 09, 2011, 12:26:51 pm »
Hello... i want know how find a way to install the lastest version (0.9.30) of lazarus under Xubuntu because in the Ubuntu Application Center only appears the 0.9.28?

The way I did it (Xubuntu 10.04):
  • Add Lazarus' Ubuntu repository. Read how to do it in this wiki page.
  • Then uninstall your current Lazarus installation.
  • Then look for Lazarus 0.9.30 and install it.

Note that may be you can't do it from Ubuntu Application Center (I used it only twice and now I hate it).  I recommend Synaptic (may be you'll need to install it first).

You should uninstall Lazarus first because Canonical updated the FreePascal Compiler but they didn't updated dependencies between Lazarus and FreePascal so there's a conflict.
« Last Edit: June 09, 2011, 12:30:58 pm by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

99Percent

  • Full Member
  • ***
  • Posts: 160
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #3 on: June 10, 2011, 12:34:48 am »
Of course I am using a VirtualBox VM to test Lazarus installation, otherwise I would have lost all whats left of my hair by now, lol.

I noticed that to fix the dependencies of fp-units-gtk, fp-units-multimedia etc, you need to install libgtk2.0-dev  eg:
 
sudo apt-get install libgtk2.0-dev
sudo apt-get -f install afterwards

Lazarus 0.9.30 and FPC 2.4.2 install fine now, but I still cannot rebuild lazarus from the ide I get:
/usr/lib/lazarus/0.9.30/ide/lazconf.pp(1,1) Fatal: Can't find unit DefineTemplates used by LazConf

This file is clearly there in /usr/lib/lazarus/0.9.30/components/codetools

I can run make and it seems to rebuild 0.9.30 (with serveral warnings "../link.res contains output sections; did you forget -T" (I found out this is a benign message).

I tried adding the codetools package and rebuilding lazarus with sudo make but it still refuses to build lazarus from within the ide. Why is it that I can build Lazarus with sudo make and not within the IDE? What makes the difference? I also tried starting lazarus with sudo ./startlazarus

99Percent

  • Full Member
  • ***
  • Posts: 160
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #4 on: June 10, 2011, 12:57:57 am »
Dunno what I did, but it is Lazarus 0.9.30 seems to be rebuilding fine inside the IDE now. Oh well.

Hydexon

  • Full Member
  • ***
  • Posts: 170
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #5 on: June 11, 2011, 12:53:40 am »
Well, I gonna try that, thanks guys!
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #6 on: June 11, 2011, 01:21:09 am »
Hello... i want know how find a way to install the lastest version (0.9.30) of lazarus under Xubuntu because in the Ubuntu Application Center only appears the 0.9.28?

The way I did it (Xubuntu 10.04):
  • Add Lazarus' Ubuntu repository. Read how to do it in this wiki page.
  • Then uninstall your current Lazarus installation.
  • Then look for Lazarus 0.9.30 and install it.

Note that may be you can't do it from Ubuntu Application Center (I used it only twice and now I hate it).  I recommend Synaptic (may be you'll need to install it first).

You should uninstall Lazarus first because Canonical updated the FreePascal Compiler but they didn't updated dependencies between Lazarus and FreePascal so there's a conflict.


This worked well from Debian via synaptic for this newbie. Thanks.

Once set up in synaptic (a gui version control/package manager...work for Ubuntu? I would think so) updating is a breeze. Lazarus installs just fine (like a charm!)

The next hurdle is installing components via synaptic. I tried it for Bgrabitmap and entered wrong address in the 'add repository' and broke synaptic, so be careful you have the right address for the repo.
 

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #7 on: June 19, 2011, 10:18:05 pm »
Once set up in synaptic (a gui version control/package manager...work for Ubuntu? I would think so) updating is a breeze. Lazarus installs just fine (like a charm!)
Yes, it works for Ubuntu.   ::)

The next hurdle is installing components via synaptic. I tried it for Bgrabitmap and entered wrong address in the 'add repository' and broke synaptic, so be careful you have the right address for the repo.
The only way to install components is "by hand", because it's necessary to recompile Lazarus (components aren't installed by dynamic libraries as Delphi does) so AFAIK you can't install them using .deb packages.  May be you can download the sources and scripts, but you'll need to recompile every time they're updated.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #8 on: May 06, 2017, 10:50:56 pm »
It seems to be more difficult with Xubuntu 16.

While I was successful in installing Free Pascal (including compiling and running a simple FPC program) Lazarus is unable to link due to an unmet dependency (the missing library is probably libgtk1.2-dev. It cannot be installed with apt, however).
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #9 on: May 08, 2017, 09:09:34 am »
It seems to be more difficult with Xubuntu 16.

While I was successful in installing Free Pascal (including compiling and running a simple FPC program) Lazarus is unable to link due to an unmet dependency (the missing library is probably libgtk1.2-dev. It cannot be installed with apt, however).
I'm using Xubuntu 16 LTS and I had't had any problem installing and updating from the ubuntu repository. It isn't the latest build but it works perfectly.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #10 on: May 08, 2017, 08:11:17 pm »
It seems to be more difficult with Xubuntu 16.

While I was successful in installing Free Pascal (including compiling and running a simple FPC program) Lazarus is unable to link due to an unmet dependency (the missing library is probably libgtk1.2-dev. It cannot be installed with apt, however).
I'm using Xubuntu 16 LTS and I had't had any problem installing and updating from the ubuntu repository. It isn't the latest build but it works perfectly.

How did you install Lazarus?

I used a fresh installation of Xubuntu 16.04, first installed Free Pascal with sudo apt-get install fpc and then Free Pascal sources with sudo apt-get install fpcsrc.

I wasn't able, however, to install Lazarus with sudo apt-get install lazarus, since APT complained about unmet dependencies.

I then tried to force install Lazarus from a downloaded deb package with sudo dpkg -i lazarus-project_1.6.4-0_i386.deb. This in fact resulted in a working IDE, but if I try to compile a very simple program I get an error message as shown in the attached screen shot.

Checking the installation with sudo apt-get check delivers the following reply:

Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
lazarus-project : Depends: libgtk2.0-dev (>= 2.6.0) but it is not installed
E: Unmet dependencies. Try using -f.


Obviously, the missing libgtk2.0-dev prevents building apps with GUI, since I am able to build normal FPC console mode programs without any problem. Unfortunately, I am unable to install this library, since apt didn't find it in the standard repositories and I didn't find a package as well.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

M+AUDIO

  • New Member
  • *
  • Posts: 48
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #11 on: May 09, 2017, 09:02:38 am »
Hi,
I'm currently using FPC(trunk)+LAZ(trunk) on my Xubuntu 16.04 VM's (one x86 and one x86_64).
I've used the following to install dependencies for lazarus in my (semi) automated bash script:
Code: Pascal  [Select][+][-]
  1. sudo apt install libgtk2.0-dev libgdk-pixbuf-dev
« Last Edit: May 09, 2017, 09:09:42 am by M+AUDIO »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: How to install the last version of Lazarus in Xubuntu?
« Reply #12 on: May 09, 2017, 09:17:50 am »
Try to install Synapse.  It is a graphical front-end for apt-get and dpkg.  Includes tools to easily search packages, dependencies and broken packages.

Anyway, I did installed the packages from the Downloads section and they work.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018