Recent

Author Topic: How to Installation Lazarus 2.2.0 on linux mint?  (Read 3707 times)

Rama Can

  • New Member
  • *
  • Posts: 15
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #15 on: March 25, 2022, 08:00:44 am »
Command as above

Quote
ram@ram-4G:~$ dpkg -l | grep fpc
ii  fpc-laz                                    3.2.2                                      amd64        Free Pascal Compiler
ii  fpc-src                                    3.2.2                                      amd64        Free Pascal Sources
ram@ram-4G:~$ dpkg -l | grep lazarus
rc  lazarus-ide-2.0                            2.0.6+dfsg-3                     amd64        IDE for Free Pascal - common IDE files
rc  lazarus-project                            2.2.0                                 amd64        RAD tool for freepascal
rc  lazarus-src-2.0                            2.0.6+dfsg-3                      all              IDE for Free Pascal - LCL source code
ram@ram-4G:~$ sudo apt purge lazarus
[sudo] password for ram:           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'lazarus' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
ram@ram-4G:~$ sudo apt purge fpcsrc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package fpcsrc
ram@ram-4G:~$ sudo apt purge fpc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'fpc' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
ram@ram-4G:~$ ls -l /usr/lib/x86_64-linux-gnu/fpc
ls: cannot access '/usr/lib/x86_64-linux-gnu/fpc': No such file or directory
ram@ram-4G:~$ ls -l /usr/lib/lazarus
ls: cannot access '/usr/lib/lazarus': No such file or directory


then move to directory /Downloads/lazarus/

Quote
ram@ram-4G:~/Downloads/lazarus$ ls -l *.deb
-rw-rw-r-- 1 ram ram  39280196 Mar 21 18:35 fpc-laz_3.2.2_amd64.deb
-rw-rw-r-- 1 ram ram  30635206 Mar 21 18:35 fpc-src_3.2.2-210709_amd64.deb
-rw-rw-r-- 1 ram ram 123714892 Mar 21 18:36 lazarus-project_2.2.0-0_amd64.deb
ram@ram-4G:~/Downloads/lazarus$ sudo apt install ./fpc-laz_3.2.2_amd64.deb
[sudo] password for ram:           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'fpc-laz' instead of './fpc-laz_3.2.2_amd64.deb'
fpc-laz is already the newest version (3.2.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ram@ram-4G:~/Downloads/lazarus$ sudo apt install ./fpc-laz_3.2.2_amd64.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'fpc-laz' instead of './fpc-laz_3.2.2_amd64.deb'
fpc-laz is already the newest version (3.2.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ram@ram-4G:~/Downloads/lazarus$ sudo apt install ./lazarus-project_2.2.0-0_amd64.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'lazarus-project' instead of './lazarus-project_2.2.0-0_amd64.deb'
The following NEW packages will be installed:
  lazarus-project
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 848 MB of additional disk space will be used.
Get:1 /home/ram/Downloads/lazarus/lazarus-project_2.2.0-0_amd64.deb lazarus-project amd64 2.2.0 [124 MB]
Selecting previously unselected package lazarus-project.
dpkg: warning: files list file for package 'dbconfig-common' missing; assuming p
ackage has no files currently installed
(Reading database ... 425156 files and directories currently installed.)
Preparing to unpack .../lazarus-project_2.2.0-0_amd64.deb ...
Unpacking lazarus-project (2.2.0) ...
Setting up lazarus-project (2.2.0) ...
Processing triggers for shared-mime-info (1.15-1) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.24+linuxmint1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
W: Repository is broken: lazarus-project:amd64 (= 2.2.0) has no Size information

error that occurs when ./lazarus-project_2.2.0-0_amd64.deb
Quote
W: Repository is broken: lazarus-project:amd64 (= 2.2.0) has no Size information

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #16 on: March 25, 2022, 09:35:38 am »
Sigh ....

I should have been clearer I guess.  Ram, when you used the dpkg commands, it showed you that apt thinks it has  fpc-laz, fpc-src, lazarus-ide-2.0, lazarus-project and lazarus-src-2.0. Unfortunately, you have removed some or all of the files associated with those packages, manually, with the rm command.

So, you should not have proceeded until you cleaned up that situation. I should have mentioned that the actual package names vary depending on where they origionally came from, thats why the dpkg -l command to determine the actual names for you to use in the "sudo apt purge <package_name>"

I am afraid you need to remove them, one by one, in reverse order until the dpkg -l | grep <fpc or lazarus> commands return nothing.

Please do not proceed with installing until you have removed the broken ones.

And, again, I should have been clearer, when installing, I said to check for error messages, I should have added, do not proceed if you get an error message. 

Generally, when someone gives you a set of instructions, step by step, you should stop when one step fails !  The following steps will probably fail too !

So, please repeat my previous set of instructions, this time, using the correct package name in the "sudo apt purge <package_name>".

You should be able to get to the stage where you can run -

Code: Bash  [Select][+][-]
  1. dpkg -l | grep fpc <enter>
  2. dpkg -l | grep lazarus <enter>

and get no response. Do not proceed to install anything until you can get to that stage.  Just to be clear, do not try and install FPC nor Lazarus until you get no response back to the two commands above.

Use the command -

Code: Bash  [Select][+][-]
  1. sudo apt purge <package_name> <enter>

Where the package_name is, one by one -
lazarus-src-2.0
lazarus-project
lazarus-ide-2.0
fpc-src
fpc-laz

I think you are going to have problems with that stage, so lets get it done before proceeding !

Davo



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

Handoko

  • Hero Member
  • *****
  • Posts: 5158
  • My goal: build my own game engine using Lazarus
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #17 on: March 25, 2022, 10:17:09 am »
Synaptic Package Manager is a GUI tool that can help you remove broken package easily. And GDebi Package Installer can help you automatically install required missing packages.

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #18 on: March 25, 2022, 12:40:22 pm »
Yeah, but neither are installed by default on Mint, its an Ubuntu clone.  And installing more packages right now sounds like a bit of a mistake until that apt database is thinking straight again.

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

Zoran

  • Hero Member
  • *****
  • Posts: 1831
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #19 on: March 25, 2022, 02:13:27 pm »
My advice is -- do not use deb packages -- use install script for fpc (called "one big file" in fpc download section), then install Lazarus from source.

It's quite straightforward, you have control where fpc and lazarus will be installed (and you should put it under your user path).
Also, unistalling is quite simple then -- it's just removing these folders.

For details see (only now you use the latest fpc and lazarus versions, of course): https://forum.lazarus.freepascal.org/index.php/topic,35214.msg246573.html#msg246573

Rama Can

  • New Member
  • *
  • Posts: 15
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #20 on: March 26, 2022, 05:26:51 pm »
I have run according to the command above
Code: Bash  [Select][+][-]
  1. sudo apt purge < package_name >

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #21 on: March 27, 2022, 12:19:22 am »
OK, sounds like w are making progress.  By now I hope you are trying to understand the commands you are using ?  Its your system and it really should be your informed decision about what happens to it. Blindly following instructions form someone else, no matter how well intended is always risky.

OK, Lets see of anything remains -

Code: Bash  [Select][+][-]
  1. find /usr -name "lazarus-*" 2> /dev/null
  2.  
  3. find /usr -name "fpc-*" 2> /dev/null

If both those command come back cleanly, thats good, proceed. If you get a response from either command, you will have to decide if its an issue or not. Maybe you should remove it manually or, maybe you should not.  If its there incidentally, leave it alone, if it looks like its part of a previous install, maybe show us before acting ? 

Remember that if you remove something you should not, really bad things will happen. On the other hand, if you leave it there and your next install fails, its easy to start again. So, if in doubt, leave it there !

Next, given the twisted history, maybe its a good idea to remove any old config files / directories ? This will find them, you know how to remove them by now.
Code: Bash  [Select][+][-]
  1. find / -name ".fpc.cfg" 2> /dev/null
  2. find / -name "fpc.cfg" 2> /dev/null
  3.  
  4. find / -name ".lazarus*" 2> /dev/null

Only you can decide if you want to keep them, I suggest you dont !

All that done ?

So, if you are happy with the above, maybe its time to start reinstalling !  You know how to do that too ! (but remember, use "apt" and use the "./" in front of the deb names.

Or, as several people have mentioned, consider a source install, at least for Lazarus.  I personally would not use anything else. Its a touch harder but much more flexible and you will not find your self in the mixed up state you got into just now. Your call. People here will help you either way.

Davo


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

Rama Can

  • New Member
  • *
  • Posts: 15
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #22 on: March 27, 2022, 05:13:08 pm »
with that command, I found nothing,  and I feel that nothing bothers anymore

Quote
ram@ram-4G:~$ find /usr -name "lazarus-*" 2> /dev/null
ram@ram-4G:~$ find /usr -name "fpc-*" 2> /dev/null
ram@ram-4G:~$ find / -name ".fpc.cfg" 2> /dev/null
ram@ram-4G:~$ find / -name "fpc.cfg" 2> /dev/null
ram@ram-4G:~$ find / -name ".lazarus*" 2> /dev/null

then I tried to install again with the command
Code: Bash  [Select][+][-]
  1.     cd <some_dir>
  2.     ls -l *.deb
  3.     // all good
  4.     sudo apt install ./fpc-laz_3.2.2_amd64.deb
  5.     // all good
  6.     sudo apt install ./fpc-src_3.2.2_amd64.deb
  7.     // all good
  8.     sudo apt install ./lazarus-project_2.2.0-0_amd64.deb
  9.     // all good

i open lazarus, but there are parts missing, how to fix it?
« Last Edit: March 27, 2022, 07:29:33 pm by Rama Can »

Rama Can

  • New Member
  • *
  • Posts: 15
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #23 on: March 27, 2022, 07:19:35 pm »
I think I'm quite happy with it so far, how do I fix the missing piece?

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #24 on: March 28, 2022, 12:49:18 am »
I think I'm quite happy with it so far, how do I fix the missing piece?

You will have to tell us what piece is missing. Neither image you have posted appear to be missing anything.

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

dsiders

  • Hero Member
  • *****
  • Posts: 1084
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #25 on: March 28, 2022, 12:59:23 am »
I think I'm quite happy with it so far, how do I fix the missing piece?
You will have to tell us what piece is missing. Neither image you have posted appear to be missing anything.

There is no object inspector. Use Window > Center a lot window and select Object Inspector from the menu.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #26 on: March 28, 2022, 01:02:20 am »
And the missing Messages window should appear when you compile something.

Rama Can

  • New Member
  • *
  • Posts: 15
Re: How to Installation Lazarus 2.2.0 on linux mint?
« Reply #27 on: March 28, 2022, 04:51:15 am »
[Solved] thank you to all who have helped me patiently and sincerely, a very valuable experience to be able to talk to all of you, always healthy.

 

TinyPortal © 2005-2018