Recent

Author Topic: Installing Lazarus 1.8.4 on Ubuntu 18.04  (Read 72915 times)

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #30 on: August 23, 2018, 08:43:03 am »
Me too have problem compiling to 32-bit Linux binaries, I'm using 64-bit Linux.

One more thing while I am sprouting off !  I believe most problems people have installing on Ubuntu relate to the fact that people use dpkg -i to install downloaded debs and dpkg does not resolve dependencies.

I think so, it seems dpkg is not smart enough to solve the dependency issue. I recommend GDebi because on my tests it managed to solve several dependency issues, which dpkg failed.

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #31 on: August 23, 2018, 09:29:00 am »
Ah, Handoko, just to clarify.  dpkg does not claim to resolve dependencies, Its not intended to. Its a low level command intended to be called by smarter tools.

gdebi is most certainly the way to go but sadly, its not installed by default on all deb using systems !  I recently had a user complaining my tomboy-ng was generating errors on his current Debian system, when I looked into it, I realized he was using dpkg to install because gdebi was unavailable.

I recommended he first install gdebi (apt get gdebi) and then my app !    'apt' of course does resolve dependencies but only gets things from official repos. From memory, gdebi was about 50meg of extra disk space, cli and gui tools. Good value !

By the way, there should be no reason to reboot during installs of this nature.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #32 on: August 23, 2018, 06:27:57 pm »
From https://wiki.debian.org/dpkg
dpkg checks dependencies and will refuse to install a package whose dependencies aren't met, but it won't help you find and install those dependencies. You need a higher-level tool (e.g. aptitude, apt-get or dselect) for that.

Ah, Handoko, just to clarify.  dpkg does not claim to resolve dependencies, Its not intended to. Its a low level command intended to be called by smarter tools.
dpkg does resolve dependencies when you put all DEB files on the same directory, not internet dependencies.

Quote
'apt' of course does resolve dependencies but only gets things from official repos.
If you know how to set /etc/apt/sources.list, you can use any repository, including your own site repository.

Quote
From memory, gdebi was about 50meg of extra disk space, cli and gui tools. Good value !
FPC and Lazarus should not need gdebi, but it is a valuable tool for people that are not linux sys admins.

Quote
By the way, there should be no reason to reboot during installs of this nature.
Correct.

The problem here is bigger than you think: man power lacking on many open source projects.
-------------------
Is Debian Dying?
Off the Beat: Bruce Byfield's Blog
Feb 11, 2011 GMT
Bruce Byfield
http://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruce-Byfield-s-Blog/Is-Debian-Dying
-------------------

Open source developers are getting old, retiring and dying, and not being replaced as fast as that...

And a last piece of information: of course, Debian won't be dying any time soon.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #33 on: August 23, 2018, 08:43:42 pm »
The way I've always installed in Debian derivatives is through a local "repository" of sorts. This the process I follow(ed):

Preparing a local repository
  • Create a directory, say /usr/local/mydebs
  • Add a line to your sources.list:
    deb file:/usr/local/mydebs ./
  • In ~/bin/ create an script file update-mydebs with this content:
Code: [Select]
#! /bin/bash
cd /usr/local/mydebs
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
apt-get update
    and make it executable.

Updating Lazarus
Now, every time a new Lazarus release comes:
  • Uninstall (purge) the previous release
  • Download the three DEBs and copy/move them to /usr/local/mydebs
  • In a terminal, run: sudo update-mydebs
  • In your package manager (Synaptic, Muon, etc.) search for and install the new Lazarus version (package lazarus-project); it will pick up all its dependencies--mainly fpc and fpc-src

I've followed this process for years and the only time it failed it was because a bad Ubuntu install.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #34 on: August 23, 2018, 09:01:12 pm »
Thank you for sharing your script. I'm not good in using Terminal, but I'm sure to try your trick when the next Lazarus comes out.

vangli

  • New Member
  • *
  • Posts: 44
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #35 on: August 30, 2018, 03:59:22 pm »
Hi. I also meet this problem, Ubuntu 18.04 overwriting a manual installation from .deb packages. The simple solution, as root (or sudo ....), is doing the following after removing Ubuntu versions of Lazarus and fpc. First install apt-mark if you not already has it installed

apt install apt-mark

Install the lazarus, fpc and fpc-source .deb packages manually with your preferred tool, then

apt-mark showmanual | grep lazarus
apt-mark showmanual | grep fpc
apt-mark hold lazarus-project
apt-mark hold fpc fpc-src
apt-mark showhold

The to first list your Lazarus compiler system and tells you the names for the next commands. The hold commands mark the packages to be held back from upgrades and dist-upgrades. On upgrades you will get a message about packages held back . The last command just list which packages that are held back.

Bent
Regards Bent

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #36 on: August 30, 2018, 04:07:18 pm »
Thank you for sharing your knowledge.

I'm not very knowledgeable in using Linux Terminal. I didn't know about apt-mark hold. I use Synaptic's version locking to prevent Ubuntu to update the FPC packages I installed by using the deb packages downloaded from SourceForge.

I will try your suggestion on next Lazarus / Ubuntu release.

dfergfla

  • Jr. Member
  • **
  • Posts: 58
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #37 on: September 01, 2018, 02:16:04 am »
I'm doomed!!  I have tried everything I can to get Lazarus to stop breaking due to this damn update outhere that breaks it every time.  I thought maybe this apt-mark would work.  But as soon as I try to install apt-mark I find it isn't in the repo my distro uses.  this whole mess is so frustrating.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #38 on: September 01, 2018, 02:57:37 am »
I'm doomed!!  I have tried everything I can to get Lazarus to stop breaking due to this damn update outhere that breaks it every time.  I thought maybe this apt-mark would work.  But as soon as I try to install apt-mark I find it isn't in the repo my distro uses.  this whole mess is so frustrating.

Have you tried my method above? Ubuntu should not install updates unless they come from the same repository---or from a manual install---and with my method that repository is under your absolute control. No need to lock versions, no nothing but select the lazarus-project package and install.

Edited to add this
NOTE: I though you should know that I've not installed yet on a release higher than 16.04. If anyone does, please tell your results.
« Last Edit: September 01, 2018, 03:23:42 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #39 on: September 01, 2018, 04:13:55 am »
I'm doomed!!  I have tried everything I can to get Lazarus to stop breaking due to this damn update outhere that breaks it every time.  I thought maybe this apt-mark would work.  But as soon as I try to install apt-mark I find it isn't in the repo my distro uses.  this whole mess is so frustrating.
You can talk directly with Debian Ubuntu Pascal Packaging Team:
Pascal Packaging Team <pkg-pascal-devel@lists.alioth.debian.org>

You can also check the changes from original sources into Debian packages:
Packages overview for Pascal Packaging Team
https://qa.debian.org/developer.php?login=pkg-pascal-devel@lists.alioth.debian.org

fpc - Free Pascal - SDK suite dependency package
https://packages.qa.debian.org/f/fpc.html

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #40 on: September 01, 2018, 10:14:52 am »
I'm doomed!!
Dump external .debs and you are doomed no more! :)

You are hard-headed. You bang your head with the Debian package system longer than people in average.
Finally you will end up with the same conclusion though.
For Hartmut at least this worked without problems:
 https://forum.lazarus.freepascal.org/index.php/topic,42393.msg295887.html#msg295887
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

dfergfla

  • Jr. Member
  • **
  • Posts: 58
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #41 on: September 01, 2018, 07:28:11 pm »
I'm doomed!!  I have tried everything I can to get Lazarus to stop breaking due to this damn update outhere that breaks it every time.  I thought maybe this apt-mark would work.  But as soon as I try to install apt-mark I find it isn't in the repo my distro uses.  this whole mess is so frustrating.

Have you tried my method above? Ubuntu should not install updates unless they come from the same repository---or from a manual install---and with my method that repository is under your absolute control. No need to lock versions, no nothing but select the lazarus-project package and install.

Edited to add this
NOTE: I though you should know that I've not installed yet on a release higher than 16.04. If anyone does, please tell your results.

I will give it a try

dfergfla

  • Jr. Member
  • **
  • Posts: 58
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #42 on: September 01, 2018, 07:54:18 pm »
I'm doomed!!
Dump external .debs and you are doomed no more! :)

You are hard-headed. You bang your head with the Debian package system longer than people in average.
Finally you will end up with the same conclusion though.
For Hartmut at least this worked without problems:
 https://forum.lazarus.freepascal.org/index.php/topic,42393.msg295887.html#msg295887

Ok, I am giving it a try.  I have never done anything quite like this in Linux before.  I have an error, but dont know why.

Code: Pascal  [Select][+][-]
  1. david@david-HP:~$ sudo update-mydebs
  2. dpkg-scanpackages: warning: Packages in archive but missing from override file:
  3. dpkg-scanpackages: warning:   fpc fpc-src lazarus-project
  4. dpkg-scanpackages: info: Wrote 3 entries to output Packages file.
  5. Get:1 file:/usr/local/mydebs ./ InRelease
  6. Ign:1 file:/usr/local/mydebs ./ InRelease
  7. Get:2 file:/usr/local/mydebs ./ Release
  8. Err:2 file:/usr/local/mydebs ./ Release
  9.   File not found - /usr/local/mydebs/./Release (2: No such file or directory)
  10.  

But "/user/local/mydebs" does exist

Code: Pascal  [Select][+][-]
  1. david@david-HP:~$ cd /usr/local/mydebs
  2. david@david-HP:/usr/local/mydebs$

I do not know what I have done wrong.

« Last Edit: September 01, 2018, 07:59:06 pm by dfergfla »

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #43 on: September 01, 2018, 08:33:58 pm »
[...] I have an error, but dont know why.

Code: Pascal  [Select][+][-]
  1. david@david-HP:~$ sudo update-mydebs
  2. dpkg-scanpackages: warning: Packages in archive but missing from override file:
  3. dpkg-scanpackages: warning:   fpc fpc-src lazarus-project
  4. dpkg-scanpackages: info: Wrote 3 entries to output Packages file.
  5. Get:1 file:/usr/local/mydebs ./ InRelease
  6. Ign:1 file:/usr/local/mydebs ./ InRelease
  7. Get:2 file:/usr/local/mydebs ./ Release
  8. Err:2 file:/usr/local/mydebs ./ Release
  9.   File not found - /usr/local/mydebs/./Release (2: No such file or directory)
  10.  

[...]
I do not know what I have done wrong.

Nothing wrong with you, though maybe with me. It looks like there have been some changes to either dpkg(-scanpackages), apt(-get) or both. Either that or there is something different in my configuration(s).

You can ignore the warnings of dpkg-scanpackages (they are meaningless for you), but the other errors (which come from apt-get update) may be fatal ... or not: have you looked to see if Synaptic has the "new" packages ready to install?

I'm sorry that I can't be of more help but my access to anything newer than Ubuntu 16.04 is very limited. Maybe Juha is right, after all :)

ETA: For completeness sake, this is how executing the script looks like normally (in Spanish):
Code: [Select]
lucamar@luna:~/bin$ sudo ./update-mydebs.sh       
dpkg-scanpackages: aviso: Paquetes en el archivo pero no presentes en el archivo «override»:
dpkg-scanpackages: aviso:   fpc fpc-src lazarus-project
dpkg-scanpackages: información: Se han escrito «3» entradas en el archivo «Packages» de salida.
Ign file: ./ InRelease
Ign file: ./ Release.gpg
Ign file: ./ Release
Ign http://es.archive.ubuntu.com trusty InRelease                             
Ign http://extras.ubuntu.com trusty InRelease                                 
Ign file: ./ Translation-es_ES                                                 
Ign file: ./ Translation-es                                                   
Des:1 http://extras.ubuntu.com trusty Release.gpg [72 B]                       
Ign file: ./ Translation-en                                                   
[... lots of similar lines from "apt-get update" ...]
Ign http://es.archive.ubuntu.com trusty/restricted Translation-es_ES
Ign http://es.archive.ubuntu.com trusty/universe Translation-es_ES
Descargados 17,5 MB en 10min. 12seg. (28,5 kB/s)
Leyendo lista de paquetes... Hecho
As you see, dpkg-scanpackages gives the same warnings/info, which is normal, but "apt-get update" works normally.

Note: luna is a Kubuntu 14.04 box, so YMMV.
Ahem ... it does indeed "vary", doesn't it?  :(
« Last Edit: September 01, 2018, 09:05:03 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

dfergfla

  • Jr. Member
  • **
  • Posts: 58
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #44 on: September 01, 2018, 08:46:23 pm »
Damn, no the new one isn't in the package manager for me to install.

I am at my wits end.  I can't install it from the package manager because that is broke from the very beginning.  I can install from the debs and that is fine until the package manager overwrites it with something that doesn't work.  Hopefully someone will get it together and do something about the root of the issue.  I have posted on the forums about the fact that the Lazarus that is in the repo is broken and doesn't work.  I have also posted about the package manager overwriting my working manual install and breaking it.  I have not gotten any response at all.  If this was something with Firefox the distro would be all over it to fix it.  But, it's Lazarus and they just don't care.  It appears to be coming from the Debian repos which also seem to be the ones Ubuntu is using or using for theirs.  I can only hope that someone from the Lazarus team knows someone on the Debian/Ubuntu team and will take the initiative and work this out.  But, I kind of doubt it.

 

TinyPortal © 2005-2018