Forum > Linux
Request: A beginner's guide to installing Lazarus 2.2.6 for Ubuntu 22.04
Nel_Fie:
CURRENT SOLUTIONS (as of 24.08.2023) : Relevant post link
I'm completely new to Linux/Ubuntu, having just upgraded my system from Windows 7. I barely understand yet how the terminal works or is supposed to be used. Can someone here provide me a simple step-by-step to installing the current version of Lazarus from scratch (with no pre-existing installation), down to the actual commands for the terminal?
I've looked at the Lazarus Wiki page, I've seen Handoko's pinned thread at the top of the section (which was last edited in 2018, and I assume things can change a lot in 5 years), looked around in this section of the forum (e.g. I've seen this recent thread: "The problem with installing lazarus 2.2.6 in Ubuntu 22.04" but it doesn't have any thorough instructions inside as far as I saw).
A lot of the information provided seems either outdated, and/or makes a lot of assumptions of pre-existing knowledge on the part of the user about how Ubuntu and related things work, and/or has the steps kind of disordered across different sections or posts, with backtracking across the board, etc... well either way, I haven't found anything that I'm entirely confident won't just end up filling my drive with a lot of useless clog that I'll end up having to go through and delete by hand and start all over again - or heaven forfend, reinstall Ubuntu from scratch just for the hope of making Lazarus work.
So, if anyone here knows and has the time, could you please write down a beginner's guide to installing the current version of Lazarus for Ubuntu?
Any additional recommendations regarding decisions to be made during the installation process are welcome - for example, I saw some discussion about different debuggers that can be used and which ones work better. Not sure if that's entirely relevant during installation, but if it is, I'd be glad to know about it.
440bx:
I cannot help with the installation of Lazarus on Ubuntu because I don't use Ubuntu BUT, based on what you described, I would _strongly_ recommend that you have Ubuntu installed in a Virtual Machine. This would allow you to take snapshots which are enormous time savers when you're just learning how to do something as they allow you to go back to the last state/snapshot that was problem-free instead of having to redo many steps (including having to re-install the O/S in a worst case.)
That's my $0.02 worth of "help".
HTH.
Lulu:
Hi, I suggest you to use fpcupdeluxe, it's a wonderfull automatic installer for all version of fpc and lazarus.
On your new Ubuntu machine:
1) open a console and run the following command to install the prerequisites
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---sudo apt install make binutils build-essential gdb subversion zip unzip libx11-dev libgtk2.0-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev
2) Create a folder fpcupdeluxe somewhere in /home/your_user_name, for example, I'm lulu so, for me it's /home/lulu/fpcupdeluxe
3) Dowload the fpcupdeluxe linux version here: https://github.com/newpascal/fpcupdeluxe/releases/latest and put it in the created folder
4) Run fpcupdeluxe-x86_64-linux
5) Choose a version for FPC and Lazarus, i.e. FPC3.2.2 Lazarus2.2.4 or simply click on STABLE button
6) click button "Install/Update FPC+Lazarus, wait...
7) when its done, close fpcupdeluxe and double click on the created Lazarus icon on your Ubuntu desktop.
I hope I don't forgotten something...
Edit: for usefull informations read https://github.com/LongDirtyAnimAlf/fpcupdeluxe
and there is a discussion on this forum https://forum.lazarus.freepascal.org/index.php/topic,34645.0.html
Leledumbo:
* Download all 3 debs from here
* If you have GDebi installed you can just block them all, right click then install, the dependencies will be downloaded on the go
* Otherwise, open a terminal, cd to where you download them, then just: sudo dpkg -i *.deb. Essentially, that's what GDebi does, so it's the same as the previous stepI suggest familiarizing yourself with the system, including the ability to navigate and execute terminal commands. As a developer, that's essential. Only casual users won't need to go down to terminal level.
dbannon:
--- Quote from: Leledumbo on August 23, 2023, 05:57:44 am ---...
Otherwise, open a terminal, cd to where you download them, then just: sudo dpkg -i *.deb. Essentially, that's what GDebi does, so it's the same as the previous step[/li][/list]
--- End quote ---
Sadly, no. dpkg does not resolve dependencies and most clean installs of Ubuntu will need some. I am no sure if
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---sudo apt install *.deb <enter> will work, need to test. But I suggest its not a great idea to install things as root with a wildcard. Better, in my opinion, to name each of the three files on the sudo apt command line. Not as hard as it sounds, first, after the down load, go to the download directory, probably /home/YOUR_USERNAME/downloads, and do a
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---ls -l *.deb <enter> to view the files, noting, perhaps that the three we expect are there. Then, type
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---sudo apt install (and a space but not Enter yet) and add the correct file names, one by one, by either -
[x] copy the names by just selecting one with the mouse and then clicking the mouse middle button, add a space and do the next one ...
or
[x] start typing one of the names, press tab and see if the OS has enough information to fill in the command line for you, if so, add a space and do the next one, if not, type more of the file name, tab ...
Then, and only then, add the <enter> !
The above sounds a bit pedantic but a new linux user needs to start off with good habits, a wild card install from the downloads directory is not a good idea.
David
A lot of this is explained in the wiki page, installing Lazarus on Linux, it really does not matter which Linux or which version of Linux you are using. See https://wiki.freepascal.org/Installing_Lazarus_on_Linux
And Leledumbo is definitely right, if you are going to use linux in any more then the most superficial way, you need to use the command line. You will soon be doing what I wrote above in far less time than it takes to read my instructions ....
David
Navigation
[0] Message Index
[#] Next page