Lazarus

Installation => Linux => Topic started by: Handoko on December 13, 2017, 01:52:56 pm

Title: How to Install Lazarus on Ubuntu
Post by: Handoko on December 13, 2017, 01:52:56 pm
I saw some have problems installing Lazarus 1.8.0 on Ubuntu, so I decided to test it. No problems, the installation process run smoothly with some non-critical messages.

My system:
- Ubuntu Mate 17.10 64-bit
- Previous Lazarus version was 1.8.0RC5
- Installation tool: Gdebi (read more https://simple.wikipedia.org/wiki/Gdebi)
- My home folder: /home/handoko
- Installation files downloaded from https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.8.0/

I use Gdebi (instead of sudo dpkg), which is more user friendly and it can provide you some useful information if the installation fails. Also I recommend Synaptic Package Manager, which can be useful if you want to fix broken packages and do version locking.

On this test, I did not do version locking and I also did not reboot my computer. The test result was: it installed successfully, I can compile my old projects. Lets see, will Ubuntu downgrade my FPC or not, the version is not locked.

My installation process:

01. I downloaded all the 3 deb files
02. Double clicked fpc_3.0.4-1_amd64.deb (it will start Gdebi)
03. Got a warning: "An older version is available ..." (see pic: Message 1)
04. Ignored the message and continue the installation
05. Got an error: "Error: Breaks existing package ..." (see pic: Message 2)
06. Ignored the error and the fpc installion will be finished
07. Double clicked and installed fpc-src_3.0.4-1_amd64.deb
07. Double clicked and installed lazarus-project_1.8.0-0_amd64.deb
08. Started Lazarus and got a message "Multiple lazarus found" (see pic: Message 3)
09. I chose Abort and deleted the "bin" folder: /home/handoko/.lazarus/bin
10. Started Lazarus again and got a message "Incorrect configuration ..." (see pic: Message 4)
11. I chose Update info
12 And got a message "Upgrade configuration" (see pic: Message 5)
12. I chose Upgrade
13. Well done, everything is working correctly now

Note:

If you already have fpc/fpc-source/Lazarus installed, you have remove them before installing version 1.8.0. I used Synaptic Package Manager to do complete removal of all the 3 packages (fpc/fpc-source/Lazarus).

You may need to do cleaning up if you installation become messy.

More information about FPC/Lazarus installation, cleaning up and version locking can be read here:
http://forum.lazarus.freepascal.org/index.php/topic,38828.msg265293.html#msg265293

---edit---

I also tested how to install Lazarus 1.8.0 on Ubuntu 16.04, read here if you're interested:
http://forum.lazarus.freepascal.org/index.php/topic,39281.msg269112.html#msg269112
Title: Re: How to Install Lazarus on Ubuntu
Post by: lainz on December 13, 2017, 01:59:39 pm
I usually have problems installing Lazarus on Ubuntu. The main problem is the conflict with the Ubuntu repository and the custom installation from the Lazarus website.

Tried to lock with Synaptic but with no results..

I wish there is a portable lazarus for ubuntu, if that is possible to do.

I've not tested fpcupdeluxe under Ubuntu yet, maybe that helps..
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on December 13, 2017, 02:05:25 pm
Did you not use Gdebi?

Using Gdebi, I got a critical error message. But simply ignoring it, everything working good. Next time use Gdebi instead of sudo dpkg.
Title: Re: How to Install Lazarus on Ubuntu
Post by: lainz on December 13, 2017, 02:15:16 pm
Did you not use Gdebi?

Using Gdebi, I got a critical error message. But simply ignoring it, everything working good. Next time use Gdebi instead of sudo dpkg.

What I'm saying is that I got Lazarus installed (sorry if I did not explain it well first), but then it gets 'outdated' with the version of the Ubuntu repository due to automatic updates.

Maybe I did not lock it well, so if you can, please add a simple instruction on how to lock it, because maybe I did that step wrong.
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on December 13, 2017, 02:19:06 pm
About version locking can be found here:
http://forum.lazarus.freepascal.org/index.php/topic,38828.msg265293.html#msg265293

It is on step #04, the detail starts from step #41.
Title: Re: How to Install Lazarus on Ubuntu
Post by: lainz on December 13, 2017, 02:22:25 pm
About version locking can be found here:
http://forum.lazarus.freepascal.org/index.php/topic,38828.msg265293.html#msg265293

It is on step #04, the detail starts from step #41.

Thankyou. I must try again. Lazarus can be locked also, or just locking FPC is enough?

I'm using now in a VM Lubuntu since it requires less resources than Ubuntu.
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on December 13, 2017, 02:30:09 pm
I never version locked Lazarus, so far have no problem.

Below are images of how to use Synaptic Package Manager to do version locking:
Title: Re: How to Install Lazarus on Ubuntu
Post by: lainz on December 13, 2017, 03:05:41 pm
Thanks. It's working.

But I have a problem, there is no debugger: missing gdb. You know how to set it?
Title: Re: How to Install Lazarus on Ubuntu
Post by: Thaddy on December 13, 2017, 03:09:03 pm
Thanks. It's working.

But I have a problem, there is no debugger: missing gdb. You know how to set it?
Install it? Note that fpc 3.0.4 has GDB/MI as default and does not link any libraries on Ubuntu.
Title: Re: How to Install Lazarus on Ubuntu
Post by: lainz on December 13, 2017, 03:19:21 pm
Thanks Thaddy.
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on December 14, 2017, 12:48:02 pm
Today I tried to install Lazarus 1.8.0 on Ubuntu 16.04 LTS. It was not smooth, fortunately I managed to make it work.

I used the 3 deb files downloaded from here:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.8.0/

In my test, the Ubuntu 16.04 LTS 64-bit I used was a fresh installed as a virtual machine on my computer. I downloaded the ubuntu-16.04.3-desktop-amd64.iso.torrent from here:
http://releases.ubuntu.com/16.04/

Installing FPC Using Ubuntu Software - FAILED

I tried to install FPC without using third party tool, but it failed. After double clicked the fpc_3.0.4-1amd64.deb, Ubuntu Software came out. I clicked the "Install" button to install fpc but nothing happened. It seemed my computer was busy doing something, so I waited about 10 minutes. Still nothing happened. I gave up. See Image1.

Step By Step Installing Lazarus/FPC - SUCCEED

01. Install GDebi: sudo apt-get install gdebi
02. Right-click on fpc_3.0.4-2_amd64.deb
03. Choose: Open With > GDebi Package Installer (See Image2)
04. Ignore the warning: "An older version is available ..." (See Image3)
05. Click "Install Package" to install the fpc
06. Ignore the error: "Error: Breaks existing ..." (See Image4)
07. You also get message: "Installation finished" (See Image4)
08. Use GDebi to install fpc-src_3.0.4-2_amd64.deb
09. Use GDebi to install lazarus-project_1.8.0-1_amd64.deb
10. GDebi may tell you to install additional packges (See Image5)
11. Hooray (See Image6)
Title: Re: How to Install Lazarus on Ubuntu
Post by: mdalacu on December 14, 2017, 01:52:39 pm
I say this one more time....someone should provide an snap package for Lazarus and all of this problems will be gone. I can not do it :(
Title: Re: How to Install Lazarus on Ubuntu
Post by: Mr.Paul on December 15, 2017, 06:12:41 pm
Today I tried to install Lazarus 1.8.0 on Ubuntu 16.04 LTS. It was not smooth, fortunately I managed to make it work.
I also succeeded, more than one error, but do not care about it.  ::)
Note that the official 1.8 installation package has been updated again, which may be the reason for success.  E.g:
fpc_3.0.4-1_amd64.deb   <- old
fpc_3.0.4-2_amd64.deb   <- now!

Three Step Installing Lazarus 1.8 on ubuntu 16.04.3 - SUCCEED

01. Use GDebi to install fpc_3.0.4-2_amd64.deb
     . Ignore the error: "Error: Breaks existing ..."
02. Use GDebi to install fpc-src_3.0.4-2_amd64.deb
03. Use GDebi to install lazarus-project_1.8.0-1_amd64.deb
    . Ignore the error: "Error: install failed ... "
     sudo apt-get install -f       
 Succeed ! The Lazarus 1.8 can be run.

(Mainly because there is no suitable image editing software under Linux, such as modifying png color digits.)
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on December 15, 2017, 06:40:01 pm
Thank you for sharing your experience about installing Lazarus. I believe some will find it useful.

---of topic---
Have you tried Gimp? Gimp has save for web, a feature that can shrink image size easily with many options you can adjust. Save for web feature usually needed to install separately. On Linux, you need to install gimp-plugin-registry package.
Title: Re: How to Install Lazarus on Ubuntu
Post by: krolikbest on December 26, 2017, 04:18:32 pm
Done! Thanks Handoko.  without any errors, except i had to uninstall all prev elements from Laz 1.0.something (Trusty Tahr ver 14.04 comes with that Laz).
Only one question: on Laz IDE v1.8.0 i can't see menu with file, edition, Search, View, Source, Run etc.
I've found them :) no more problems.. :)


martin
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on December 26, 2017, 07:03:44 pm
Good to hear you managed to solve the problem.

I heard some have issue installing Lazarus 1.8.0. If you ever found any problem or/and workaround with the installation please share. So new users can learn from it and the developer can fix/improve it.
Title: Re: How to Install Lazarus on Ubuntu
Post by: Mr.Paul on January 09, 2018, 02:52:38 pm
I tried again to install Lazarus 1.8 on Lubuntu and it worked. Desktop is LXDE, from:
lubuntu-16.04-desktop-amd64.iso

Running Lazarus for the first time will report the lack of gdb, which you can go to for synaptics installation and will automatically download several packages from the network.
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on January 09, 2018, 03:29:36 pm
So, does it means there was no gdb issue when installing Lazarus 1.8.0 on Ubuntu 16.04 but on Lubuntu 16.04 we have to manually install the gdb?
Title: Re: How to Install Lazarus on Ubuntu
Post by: Mr.Paul on January 10, 2018, 02:12:04 pm
So, does it means there was no gdb issue when installing Lazarus 1.8.0 on Ubuntu 16.04 but on Lubuntu 16.04 we have to manually install the gdb?
Yes, gdb must be manually installed for Lazarus on Lubuntu 16.04.

I tried the new Lubuntu 16.04 LiveUSB and checked gdb in synaptic, showing that it was not installed.
Title: Re: How to Install Lazarus on Ubuntu
Post by: Ruptor on June 01, 2018, 06:06:57 pm
Can anybody help with this error. I am running 16.04 fully updated and trying to install Lazarus 1.8.4. Using right click and the software installer I had many different errors then I found this thread and tried using GDebi. It installed the fpc sources and came back with a remove button but when I installed the fpc it said installed but didn't give the remove button. I assumed everything was OK and installed Lazarus but it came up with this error that looks like it is complaining about the order of the characters so what does that mean? ::)
Title: Re: How to Install Lazarus on Ubuntu
Post by: Ruptor on June 01, 2018, 08:15:05 pm
Its OK I made it work by going in to Synaptic selecting Architecture and ARCH: i386 then going down to the fpc range and found there was still green boxes against some fpc parts. I right clicked each green box and selected "Completely remove" then hit apply and when finished I shut Synaptic and used the GDebi to install Lazarus 1.8.2. The error was gone and the package installed. When I ran Lazarus it complained about configuration files for the old version but I just told it to update them and everything works now.
Title: Re: How to Install Lazarus on Ubuntu
Post by: circular on August 11, 2018, 07:51:37 pm
Hello. I tried to download and install the three packages. It went well for the two fpc packages but then with the lazarus package I get the following error.

Oh I just saw another topic about it. Nevermind.

https://forum.lazarus.freepascal.org/index.php/topic,41524.0.html
Title: Re: How to Install Lazarus on Ubuntu
Post by: techcodie on July 13, 2020, 02:02:51 am
Just used Handokos' method to install Lazarus 2.0.10 on Mint.  Gdebi appears to be the answer all the way around, after hunting down and nuking any trace of previous versions.

Thank you very much!  Still valuable information and help.
Title: Re: How to Install Lazarus on Ubuntu
Post by: Handoko on July 13, 2020, 06:23:31 am
Hello techcodie.
Welcome to the forum and thank you for reporting back.

Glad to know that helps.
TinyPortal © 2005-2018