* * *

Author Topic: How to Install Lazarus on Ubuntu  (Read 2313 times)

Handoko

  • Hero Member
  • *****
  • Posts: 2015
  • My goal: build my own game engine using Lazarus
How to Install Lazarus on Ubuntu
« 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
« Last Edit: December 14, 2017, 12:53:31 pm by Handoko »

lainz

  • Hero Member
  • *****
  • Posts: 2254
  • I'm coding :)
    • BGRAControls
Re: How to Install Lazarus on Ubuntu
« Reply #1 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..
« Last Edit: December 13, 2017, 02:16:10 pm by lainz »
If you use BGRAControls please donate

Handoko

  • Hero Member
  • *****
  • Posts: 2015
  • My goal: build my own game engine using Lazarus
Re: How to Install Lazarus on Ubuntu
« Reply #2 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.

lainz

  • Hero Member
  • *****
  • Posts: 2254
  • I'm coding :)
    • BGRAControls
Re: How to Install Lazarus on Ubuntu
« Reply #3 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.
If you use BGRAControls please donate

Handoko

  • Hero Member
  • *****
  • Posts: 2015
  • My goal: build my own game engine using Lazarus
Re: How to Install Lazarus on Ubuntu
« Reply #4 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.

lainz

  • Hero Member
  • *****
  • Posts: 2254
  • I'm coding :)
    • BGRAControls
Re: How to Install Lazarus on Ubuntu
« Reply #5 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.
If you use BGRAControls please donate

Handoko

  • Hero Member
  • *****
  • Posts: 2015
  • My goal: build my own game engine using Lazarus
Re: How to Install Lazarus on Ubuntu
« Reply #6 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:
« Last Edit: December 13, 2017, 02:39:29 pm by Handoko »

lainz

  • Hero Member
  • *****
  • Posts: 2254
  • I'm coding :)
    • BGRAControls
Re: How to Install Lazarus on Ubuntu
« Reply #7 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?
If you use BGRAControls please donate

Thaddy

  • Hero Member
  • *****
  • Posts: 5377
Re: How to Install Lazarus on Ubuntu
« Reply #8 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.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

lainz

  • Hero Member
  • *****
  • Posts: 2254
  • I'm coding :)
    • BGRAControls
Re: How to Install Lazarus on Ubuntu
« Reply #9 on: December 13, 2017, 03:19:21 pm »
Thanks Thaddy.
If you use BGRAControls please donate

Handoko

  • Hero Member
  • *****
  • Posts: 2015
  • My goal: build my own game engine using Lazarus
Re: How to Install Lazarus on Ubuntu
« Reply #10 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)

mdalacu

  • Full Member
  • ***
  • Posts: 179
    • dmSimpleApps
Re: How to Install Lazarus on Ubuntu
« Reply #11 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 :(

Mr.Paul

  • New member
  • *
  • Posts: 29
  • 一次编写,到处编译
Re: How to Install Lazarus on Ubuntu
« Reply #12 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.)
« Last Edit: January 09, 2018, 02:32:55 pm by Mr.Paul »

Handoko

  • Hero Member
  • *****
  • Posts: 2015
  • My goal: build my own game engine using Lazarus
Re: How to Install Lazarus on Ubuntu
« Reply #13 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.
« Last Edit: December 15, 2017, 06:43:24 pm by Handoko »

krolikbest

  • Jr. Member
  • **
  • Posts: 61
Re: How to Install Lazarus on Ubuntu
« Reply #14 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
« Last Edit: December 26, 2017, 04:27:15 pm by krolikbest »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus